(()=>{var e={3338:(e,t,n)=>{"use strict";function i(e,t,n=(e,t)=>e===t){if(e===t)return!0;if(!e||!t)return!1;if(e.length!==t.length)return!1;for(let i=0,r=e.length;i<r;i++)if(!n(e[i],t[i]))return!1;return!0}function*r(e,t){let n,i;for(const r of e)void 0!==i&&t(i,r)?n.push(r):(n&&(yield n),n=[r]),i=r;n&&(yield n)}function s(e,t){for(let n=0;n<=e.length;n++)t(0===n?void 0:e[n-1],n===e.length?void 0:e[n])}function o(e,t){for(let n=0;n<e.length;n++)t(0===n?void 0:e[n-1],e[n],n+1===e.length?void 0:e[n+1])}function a(e,t=e=>e){const n=new Set;return e.filter((e=>{const i=t(e);return!n.has(i)&&(n.add(i),!0)}))}function l(e,t){return e.length>0?e[0]:t}function h(e,t,n){const i=e.slice(0,t),r=e.slice(t);return i.concat(n,r)}function u(e,t){for(const n of t)e.push(n)}var c;function d(e,t){return(n,i)=>t(e(n),e(i))}n.d(t,{E4:()=>u,Fy:()=>l,Hw:()=>f,U9:()=>g,VE:()=>d,aI:()=>i,c1:()=>p,dM:()=>a,j3:()=>m,kj:()=>o,n:()=>r,nK:()=>h,pN:()=>s}),function(e){e.isLessThan=function(e){return e<0},e.isLessThanOrEqual=function(e){return e<=0},e.isGreaterThan=function(e){return e>0},e.isNeitherLessOrGreaterThan=function(e){return 0===e},e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0}(c||(c={}));const g=(e,t)=>e-t;function f(e){return(t,n)=>-e(t,n)}class m{constructor(e){this.items=e,this.firstIdx=0,this.lastIdx=this.items.length-1}get length(){return this.lastIdx-this.firstIdx+1}takeWhile(e){let t=this.firstIdx;for(;t<this.items.length&&e(this.items[t]);)t++;const n=t===this.firstIdx?null:this.items.slice(this.firstIdx,t);return this.firstIdx=t,n}takeFromEndWhile(e){let t=this.lastIdx;for(;t>=0&&e(this.items[t]);)t--;const n=t===this.lastIdx?null:this.items.slice(t+1,this.lastIdx+1);return this.lastIdx=t,n}peek(){if(0!==this.length)return this.items[this.firstIdx]}dequeue(){const e=this.items[this.firstIdx];return this.firstIdx++,e}takeCount(e){const t=this.items.slice(this.firstIdx,this.firstIdx+e);return this.firstIdx+=e,t}}class p{static{this.empty=new p((e=>{}))}constructor(e){this.iterate=e}toArray(){const e=[];return this.iterate((t=>(e.push(t),!0))),e}filter(e){return new p((t=>this.iterate((n=>!e(n)||t(n)))))}map(e){return new p((t=>this.iterate((n=>t(e(n))))))}findLast(e){let t;return this.iterate((n=>(e(n)&&(t=n),!0))),t}findLastMaxBy(e){let t,n=!0;return this.iterate((i=>((n||c.isGreaterThan(e(i,t)))&&(n=!1,t=i),!0))),t}}},7393:(e,t,n)=>{"use strict";function i(e,t){const n=function(e,t,n=e.length-1){for(let i=n;i>=0;i--)if(t(e[i]))return i;return-1}(e,t);if(-1!==n)return e[n]}function r(e,t){const n=s(e,t);return-1===n?void 0:e[n]}function s(e,t,n=0,i=e.length){let r=n,s=i;for(;r<s;){const n=Math.floor((r+s)/2);t(e[n])?r=n+1:s=n}return r-1}function o(e,t){const n=a(e,t);return n===e.length?void 0:e[n]}function a(e,t,n=0,i=e.length){let r=n,s=i;for(;r<s;){const n=Math.floor((r+s)/2);t(e[n])?s=n:r=n+1}return r}n.d(t,{Uk:()=>i,XP:()=>o,hw:()=>a,iM:()=>s,lx:()=>r,vJ:()=>l});class l{static{this.assertInvariants=!1}constructor(e){this._array=e,this._findLastMonotonousLastIdx=0}findLastMonotonous(e){if(l.assertInvariants){if(this._prevFindLastPredicate)for(const t of this._array)if(this._prevFindLastPredicate(t)&&!e(t))throw new Error("MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate.");this._prevFindLastPredicate=e}const t=s(this._array,e,this._findLastMonotonousLastIdx);return this._findLastMonotonousLastIdx=t+1,-1===t?void 0:this._array[t]}}},7110:(e,t,n)=>{"use strict";n.d(t,{Ft:()=>o,Xo:()=>a,ok:()=>r,xb:()=>s});var i=n(4327);function r(e,t){if(!e)throw new Error(t?`Assertion failed (${t})`:"Assertion Failed")}function s(e,t="Unreachable"){throw new Error(t)}function o(e){e()||(e(),(0,i.dz)(new i.D7("Assertion Failed")))}function a(e,t){let n=0;for(;n<e.length-1;){if(!t(e[n],e[n+1]))return!1;n++}return!0}},1946:(e,t,n)=>{"use strict";n.d(t,{vb:()=>l,uC:()=>h,Qg:()=>a,$6:()=>u}),n(8903);var i=n(4327),r=n(2106),s=n(9235),o=n(3339);function a(e){return!!e&&"function"==typeof e.then}Symbol("MicrotaskDelay");class l{constructor(){this.disposable=void 0,this.isDisposed=!1}cancel(){this.disposable?.dispose(),this.disposable=void 0}cancelAndSet(e,t,n=globalThis){if(this.isDisposed)throw new i.D7("Calling 'cancelAndSet' on a disposed IntervalTimer");this.cancel();const r=n.setInterval((()=>{e()}),t);this.disposable=(0,s.s)((()=>{n.clearInterval(r),this.disposable=void 0}))}dispose(){this.cancel(),this.isDisposed=!0}}class h{constructor(e,t){this.timeoutToken=-1,this.runner=e,this.timeout=t,this.timeoutHandler=this.onTimeout.bind(this)}dispose(){this.cancel(),this.runner=null}cancel(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=-1)}schedule(e=this.timeout){this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,e)}get delay(){return this.timeout}set delay(e){this.timeout=e}isScheduled(){return-1!==this.timeoutToken}onTimeout(){this.timeoutToken=-1,this.runner&&this.doRun()}doRun(){this.runner?.()}}let u,c;var d;c="function"!=typeof globalThis.requestIdleCallback||"function"!=typeof globalThis.cancelIdleCallback?(e,t)=>{(0,o._p)((()=>{if(n)return;const e=Date.now()+15,i={didTimeout:!0,timeRemaining:()=>Math.max(0,e-Date.now())};t(Object.freeze(i))}));let n=!1;return{dispose(){n||(n=!0)}}}:(e,t,n)=>{const i=e.requestIdleCallback(t,"number"==typeof n?{timeout:n}:void 0);let r=!1;return{dispose(){r||(r=!0,e.cancelIdleCallback(i))}}},u=e=>c(globalThis,e),function(e){e.settled=async function(e){let t;const n=await Promise.all(e.map((e=>e.then((e=>e),(e=>{t||(t=e)})))));if(void 0!==t)throw t;return n},e.withAsyncBody=function(e){return new Promise((async(t,n)=>{try{await e(t,n)}catch(e){n(e)}}))}}(d||(d={}));class g{static fromArray(e){return new g((t=>{t.emitMany(e)}))}static fromPromise(e){return new g((async t=>{t.emitMany(await e)}))}static fromPromises(e){return new g((async t=>{await Promise.all(e.map((async e=>t.emitOne(await e))))}))}static merge(e){return new g((async t=>{await Promise.all(e.map((async e=>{for await(const n of e)t.emitOne(n)})))}))}static{this.EMPTY=g.fromArray([])}constructor(e,t){this._state=0,this._results=[],this._error=null,this._onReturn=t,this._onStateChanged=new r.vl,queueMicrotask((async()=>{const t={emitOne:e=>this.emitOne(e),emitMany:e=>this.emitMany(e),reject:e=>this.reject(e)};try{await Promise.resolve(e(t)),this.resolve()}catch(e){this.reject(e)}finally{t.emitOne=void 0,t.emitMany=void 0,t.reject=void 0}}))}[Symbol.asyncIterator](){let e=0;return{next:async()=>{for(;;){if(2===this._state)throw this._error;if(e<this._results.length)return{done:!1,value:this._results[e++]};if(1===this._state)return{done:!0,value:void 0};await r.Jh.toPromise(this._onStateChanged.event)}},return:async()=>(this._onReturn?.(),{done:!0,value:void 0})}}static map(e,t){return new g((async n=>{for await(const i of e)n.emitOne(t(i))}))}map(e){return g.map(this,e)}static filter(e,t){return new g((async n=>{for await(const i of e)t(i)&&n.emitOne(i)}))}filter(e){return g.filter(this,e)}static coalesce(e){return g.filter(e,(e=>!!e))}coalesce(){return g.coalesce(this)}static async toPromise(e){const t=[];for await(const n of e)t.push(n);return t}toPromise(){return g.toPromise(this)}emitOne(e){0===this._state&&(this._results.push(e),this._onStateChanged.fire())}emitMany(e){0===this._state&&(this._results=this._results.concat(e),this._onStateChanged.fire())}resolve(){0===this._state&&(this._state=1,this._onStateChanged.fire())}reject(e){0===this._state&&(this._state=2,this._error=e,this._onStateChanged.fire())}}},2802:(e,t,n)=>{"use strict";n.d(t,{$l:()=>a,Gs:()=>d,MB:()=>o,Sw:()=>u,bb:()=>h,gN:()=>l,pJ:()=>c});var i=n(3946);const r="undefined"!=typeof Buffer;let s;new i.d((()=>new Uint8Array(256)));class o{static wrap(e){return r&&!Buffer.isBuffer(e)&&(e=Buffer.from(e.buffer,e.byteOffset,e.byteLength)),new o(e)}constructor(e){this.buffer=e,this.byteLength=this.buffer.byteLength}toString(){return r?this.buffer.toString():(s||(s=new TextDecoder),s.decode(this.buffer))}}function a(e,t){return(0|e[t+0])>>>0|e[t+1]<<8>>>0}function l(e,t,n){e[n+0]=255&t,t>>>=8,e[n+1]=255&t}function h(e,t){return e[t]*2**24+65536*e[t+1]+256*e[t+2]+e[t+3]}function u(e,t,n){e[n+3]=t,t>>>=8,e[n+2]=t,t>>>=8,e[n+1]=t,t>>>=8,e[n]=t}function c(e,t){return e[t]}function d(e,t,n){e[n]=t}},6260:(e,t,n)=>{"use strict";function i(e){return e}n.d(t,{VV:()=>s,o5:()=>r});class r{constructor(e,t){this.lastCache=void 0,this.lastArgKey=void 0,"function"==typeof e?(this._fn=e,this._computeKey=i):(this._fn=t,this._computeKey=e.getCacheKey)}get(e){const t=this._computeKey(e);return this.lastArgKey!==t&&(this.lastArgKey=t,this.lastCache=this._fn(e)),this.lastCache}}class s{get cachedValues(){return this._map}constructor(e,t){this._map=new Map,this._map2=new Map,"function"==typeof e?(this._fn=e,this._computeKey=i):(this._fn=t,this._computeKey=e.getCacheKey)}get(e){const t=this._computeKey(e);if(this._map2.has(t))return this._map2.get(t);const n=this._fn(e);return this._map.set(e,n),this._map2.set(t,n),n}}},8903:(e,t,n)=>{"use strict";n.d(t,{Qi:()=>a});var i=n(2106);const r=Object.freeze((function(e,t){const n=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(n)}}}));var s;!function(e){e.isCancellationToken=function(t){return t===e.None||t===e.Cancelled||t instanceof o||!(!t||"object"!=typeof t)&&"boolean"==typeof t.isCancellationRequested&&"function"==typeof t.onCancellationRequested},e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:i.Jh.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:r})}(s||(s={}));class o{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?r:(this._emitter||(this._emitter=new i.vl),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class a{constructor(e){this._token=void 0,this._parentListener=void 0,this._parentListener=e&&e.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new o),this._token}cancel(){this._token?this._token instanceof o&&this._token.cancel():this._token=s.Cancelled}dispose(e=!1){e&&this.cancel(),this._parentListener?.dispose(),this._token?this._token instanceof o&&this._token.dispose():this._token=s.None}}},1869:(e,t,n)=>{"use strict";n.d(t,{W:()=>o});var i=n(9359);const r=Object.create(null);function s(e,t){if((0,i.Kg)(t)){const n=r[t];if(void 0===n)throw new Error(`${e} references an unknown codicon: ${t}`);t=n}return r[e]=t,{id:e}}const o={add:s("add",6e4),plus:s("plus",6e4),gistNew:s("gist-new",6e4),repoCreate:s("repo-create",6e4),lightbulb:s("lightbulb",60001),lightBulb:s("light-bulb",60001),repo:s("repo",60002),repoDelete:s("repo-delete",60002),gistFork:s("gist-fork",60003),repoForked:s("repo-forked",60003),gitPullRequest:s("git-pull-request",60004),gitPullRequestAbandoned:s("git-pull-request-abandoned",60004),recordKeys:s("record-keys",60005),keyboard:s("keyboard",60005),tag:s("tag",60006),gitPullRequestLabel:s("git-pull-request-label",60006),tagAdd:s("tag-add",60006),tagRemove:s("tag-remove",60006),person:s("person",60007),personFollow:s("person-follow",60007),personOutline:s("person-outline",60007),personFilled:s("person-filled",60007),gitBranch:s("git-branch",60008),gitBranchCreate:s("git-branch-create",60008),gitBranchDelete:s("git-branch-delete",60008),sourceControl:s("source-control",60008),mirror:s("mirror",60009),mirrorPublic:s("mirror-public",60009),star:s("star",60010),starAdd:s("star-add",60010),starDelete:s("star-delete",60010),starEmpty:s("star-empty",60010),comment:s("comment",60011),commentAdd:s("comment-add",60011),alert:s("alert",60012),warning:s("warning",60012),search:s("search",60013),searchSave:s("search-save",60013),logOut:s("log-out",60014),signOut:s("sign-out",60014),logIn:s("log-in",60015),signIn:s("sign-in",60015),eye:s("eye",60016),eyeUnwatch:s("eye-unwatch",60016),eyeWatch:s("eye-watch",60016),circleFilled:s("circle-filled",60017),primitiveDot:s("primitive-dot",60017),closeDirty:s("close-dirty",60017),debugBreakpoint:s("debug-breakpoint",60017),debugBreakpointDisabled:s("debug-breakpoint-disabled",60017),debugHint:s("debug-hint",60017),terminalDecorationSuccess:s("terminal-decoration-success",60017),primitiveSquare:s("primitive-square",60018),edit:s("edit",60019),pencil:s("pencil",60019),info:s("info",60020),issueOpened:s("issue-opened",60020),gistPrivate:s("gist-private",60021),gitForkPrivate:s("git-fork-private",60021),lock:s("lock",60021),mirrorPrivate:s("mirror-private",60021),close:s("close",60022),removeClose:s("remove-close",60022),x:s("x",60022),repoSync:s("repo-sync",60023),sync:s("sync",60023),clone:s("clone",60024),desktopDownload:s("desktop-download",60024),beaker:s("beaker",60025),microscope:s("microscope",60025),vm:s("vm",60026),deviceDesktop:s("device-desktop",60026),file:s("file",60027),fileText:s("file-text",60027),more:s("more",60028),ellipsis:s("ellipsis",60028),kebabHorizontal:s("kebab-horizontal",60028),mailReply:s("mail-reply",60029),reply:s("reply",60029),organization:s("organization",60030),organizationFilled:s("organization-filled",60030),organizationOutline:s("organization-outline",60030),newFile:s("new-file",60031),fileAdd:s("file-add",60031),newFolder:s("new-folder",60032),fileDirectoryCreate:s("file-directory-create",60032),trash:s("trash",60033),trashcan:s("trashcan",60033),history:s("history",60034),clock:s("clock",60034),folder:s("folder",60035),fileDirectory:s("file-directory",60035),symbolFolder:s("symbol-folder",60035),logoGithub:s("logo-github",60036),markGithub:s("mark-github",60036),github:s("github",60036),terminal:s("terminal",60037),console:s("console",60037),repl:s("repl",60037),zap:s("zap",60038),symbolEvent:s("symbol-event",60038),error:s("error",60039),stop:s("stop",60039),variable:s("variable",60040),symbolVariable:s("symbol-variable",60040),array:s("array",60042),symbolArray:s("symbol-array",60042),symbolModule:s("symbol-module",60043),symbolPackage:s("symbol-package",60043),symbolNamespace:s("symbol-namespace",60043),symbolObject:s("symbol-object",60043),symbolMethod:s("symbol-method",60044),symbolFunction:s("symbol-function",60044),symbolConstructor:s("symbol-constructor",60044),symbolBoolean:s("symbol-boolean",60047),symbolNull:s("symbol-null",60047),symbolNumeric:s("symbol-numeric",60048),symbolNumber:s("symbol-number",60048),symbolStructure:s("symbol-structure",60049),symbolStruct:s("symbol-struct",60049),symbolParameter:s("symbol-parameter",60050),symbolTypeParameter:s("symbol-type-parameter",60050),symbolKey:s("symbol-key",60051),symbolText:s("symbol-text",60051),symbolReference:s("symbol-reference",60052),goToFile:s("go-to-file",60052),symbolEnum:s("symbol-enum",60053),symbolValue:s("symbol-value",60053),symbolRuler:s("symbol-ruler",60054),symbolUnit:s("symbol-unit",60054),activateBreakpoints:s("activate-breakpoints",60055),archive:s("archive",60056),arrowBoth:s("arrow-both",60057),arrowDown:s("arrow-down",60058),arrowLeft:s("arrow-left",60059),arrowRight:s("arrow-right",60060),arrowSmallDown:s("arrow-small-down",60061),arrowSmallLeft:s("arrow-small-left",60062),arrowSmallRight:s("arrow-small-right",60063),arrowSmallUp:s("arrow-small-up",60064),arrowUp:s("arrow-up",60065),bell:s("bell",60066),bold:s("bold",60067),book:s("book",60068),bookmark:s("bookmark",60069),debugBreakpointConditionalUnverified:s("debug-breakpoint-conditional-unverified",60070),debugBreakpointConditional:s("debug-breakpoint-conditional",60071),debugBreakpointConditionalDisabled:s("debug-breakpoint-conditional-disabled",60071),debugBreakpointDataUnverified:s("debug-breakpoint-data-unverified",60072),debugBreakpointData:s("debug-breakpoint-data",60073),debugBreakpointDataDisabled:s("debug-breakpoint-data-disabled",60073),debugBreakpointLogUnverified:s("debug-breakpoint-log-unverified",60074),debugBreakpointLog:s("debug-breakpoint-log",60075),debugBreakpointLogDisabled:s("debug-breakpoint-log-disabled",60075),briefcase:s("briefcase",60076),broadcast:s("broadcast",60077),browser:s("browser",60078),bug:s("bug",60079),calendar:s("calendar",60080),caseSensitive:s("case-sensitive",60081),check:s("check",60082),checklist:s("checklist",60083),chevronDown:s("chevron-down",60084),chevronLeft:s("chevron-left",60085),chevronRight:s("chevron-right",60086),chevronUp:s("chevron-up",60087),chromeClose:s("chrome-close",60088),chromeMaximize:s("chrome-maximize",60089),chromeMinimize:s("chrome-minimize",60090),chromeRestore:s("chrome-restore",60091),circleOutline:s("circle-outline",60092),circle:s("circle",60092),debugBreakpointUnverified:s("debug-breakpoint-unverified",60092),terminalDecorationIncomplete:s("terminal-decoration-incomplete",60092),circleSlash:s("circle-slash",60093),circuitBoard:s("circuit-board",60094),clearAll:s("clear-all",60095),clippy:s("clippy",60096),closeAll:s("close-all",60097),cloudDownload:s("cloud-download",60098),cloudUpload:s("cloud-upload",60099),code:s("code",60100),collapseAll:s("collapse-all",60101),colorMode:s("color-mode",60102),commentDiscussion:s("comment-discussion",60103),creditCard:s("credit-card",60105),dash:s("dash",60108),dashboard:s("dashboard",60109),database:s("database",60110),debugContinue:s("debug-continue",60111),debugDisconnect:s("debug-disconnect",60112),debugPause:s("debug-pause",60113),debugRestart:s("debug-restart",60114),debugStart:s("debug-start",60115),debugStepInto:s("debug-step-into",60116),debugStepOut:s("debug-step-out",60117),debugStepOver:s("debug-step-over",60118),debugStop:s("debug-stop",60119),debug:s("debug",60120),deviceCameraVideo:s("device-camera-video",60121),deviceCamera:s("device-camera",60122),deviceMobile:s("device-mobile",60123),diffAdded:s("diff-added",60124),diffIgnored:s("diff-ignored",60125),diffModified:s("diff-modified",60126),diffRemoved:s("diff-removed",60127),diffRenamed:s("diff-renamed",60128),diff:s("diff",60129),diffSidebyside:s("diff-sidebyside",60129),discard:s("discard",60130),editorLayout:s("editor-layout",60131),emptyWindow:s("empty-window",60132),exclude:s("exclude",60133),extensions:s("extensions",60134),eyeClosed:s("eye-closed",60135),fileBinary:s("file-binary",60136),fileCode:s("file-code",60137),fileMedia:s("file-media",60138),filePdf:s("file-pdf",60139),fileSubmodule:s("file-submodule",60140),fileSymlinkDirectory:s("file-symlink-directory",60141),fileSymlinkFile:s("file-symlink-file",60142),fileZip:s("file-zip",60143),files:s("files",60144),filter:s("filter",60145),flame:s("flame",60146),foldDown:s("fold-down",60147),foldUp:s("fold-up",60148),fold:s("fold",60149),folderActive:s("folder-active",60150),folderOpened:s("folder-opened",60151),gear:s("gear",60152),gift:s("gift",60153),gistSecret:s("gist-secret",60154),gist:s("gist",60155),gitCommit:s("git-commit",60156),gitCompare:s("git-compare",60157),compareChanges:s("compare-changes",60157),gitMerge:s("git-merge",60158),githubAction:s("github-action",60159),githubAlt:s("github-alt",60160),globe:s("globe",60161),grabber:s("grabber",60162),graph:s("graph",60163),gripper:s("gripper",60164),heart:s("heart",60165),home:s("home",60166),horizontalRule:s("horizontal-rule",60167),hubot:s("hubot",60168),inbox:s("inbox",60169),issueReopened:s("issue-reopened",60171),issues:s("issues",60172),italic:s("italic",60173),jersey:s("jersey",60174),json:s("json",60175),kebabVertical:s("kebab-vertical",60176),key:s("key",60177),law:s("law",60178),lightbulbAutofix:s("lightbulb-autofix",60179),linkExternal:s("link-external",60180),link:s("link",60181),listOrdered:s("list-ordered",60182),listUnordered:s("list-unordered",60183),liveShare:s("live-share",60184),loading:s("loading",60185),location:s("location",60186),mailRead:s("mail-read",60187),mail:s("mail",60188),markdown:s("markdown",60189),megaphone:s("megaphone",60190),mention:s("mention",60191),milestone:s("milestone",60192),gitPullRequestMilestone:s("git-pull-request-milestone",60192),mortarBoard:s("mortar-board",60193),move:s("move",60194),multipleWindows:s("multiple-windows",60195),mute:s("mute",60196),noNewline:s("no-newline",60197),note:s("note",60198),octoface:s("octoface",60199),openPreview:s("open-preview",60200),package:s("package",60201),paintcan:s("paintcan",60202),pin:s("pin",60203),play:s("play",60204),run:s("run",60204),plug:s("plug",60205),preserveCase:s("preserve-case",60206),preview:s("preview",60207),project:s("project",60208),pulse:s("pulse",60209),question:s("question",60210),quote:s("quote",60211),radioTower:s("radio-tower",60212),reactions:s("reactions",60213),references:s("references",60214),refresh:s("refresh",60215),regex:s("regex",60216),remoteExplorer:s("remote-explorer",60217),remote:s("remote",60218),remove:s("remove",60219),replaceAll:s("replace-all",60220),replace:s("replace",60221),repoClone:s("repo-clone",60222),repoForcePush:s("repo-force-push",60223),repoPull:s("repo-pull",60224),repoPush:s("repo-push",60225),report:s("report",60226),requestChanges:s("request-changes",60227),rocket:s("rocket",60228),rootFolderOpened:s("root-folder-opened",60229),rootFolder:s("root-folder",60230),rss:s("rss",60231),ruby:s("ruby",60232),saveAll:s("save-all",60233),saveAs:s("save-as",60234),save:s("save",60235),screenFull:s("screen-full",60236),screenNormal:s("screen-normal",60237),searchStop:s("search-stop",60238),server:s("server",60240),settingsGear:s("settings-gear",60241),settings:s("settings",60242),shield:s("shield",60243),smiley:s("smiley",60244),sortPrecedence:s("sort-precedence",60245),splitHorizontal:s("split-horizontal",60246),splitVertical:s("split-vertical",60247),squirrel:s("squirrel",60248),starFull:s("star-full",60249),starHalf:s("star-half",60250),symbolClass:s("symbol-class",60251),symbolColor:s("symbol-color",60252),symbolConstant:s("symbol-constant",60253),symbolEnumMember:s("symbol-enum-member",60254),symbolField:s("symbol-field",60255),symbolFile:s("symbol-file",60256),symbolInterface:s("symbol-interface",60257),symbolKeyword:s("symbol-keyword",60258),symbolMisc:s("symbol-misc",60259),symbolOperator:s("symbol-operator",60260),symbolProperty:s("symbol-property",60261),wrench:s("wrench",60261),wrenchSubaction:s("wrench-subaction",60261),symbolSnippet:s("symbol-snippet",60262),tasklist:s("tasklist",60263),telescope:s("telescope",60264),textSize:s("text-size",60265),threeBars:s("three-bars",60266),thumbsdown:s("thumbsdown",60267),thumbsup:s("thumbsup",60268),tools:s("tools",60269),triangleDown:s("triangle-down",60270),triangleLeft:s("triangle-left",60271),triangleRight:s("triangle-right",60272),triangleUp:s("triangle-up",60273),twitter:s("twitter",60274),unfold:s("unfold",60275),unlock:s("unlock",60276),unmute:s("unmute",60277),unverified:s("unverified",60278),verified:s("verified",60279),versions:s("versions",60280),vmActive:s("vm-active",60281),vmOutline:s("vm-outline",60282),vmRunning:s("vm-running",60283),watch:s("watch",60284),whitespace:s("whitespace",60285),wholeWord:s("whole-word",60286),window:s("window",60287),wordWrap:s("word-wrap",60288),zoomIn:s("zoom-in",60289),zoomOut:s("zoom-out",60290),listFilter:s("list-filter",60291),listFlat:s("list-flat",60292),listSelection:s("list-selection",60293),selection:s("selection",60293),listTree:s("list-tree",60294),debugBreakpointFunctionUnverified:s("debug-breakpoint-function-unverified",60295),debugBreakpointFunction:s("debug-breakpoint-function",60296),debugBreakpointFunctionDisabled:s("debug-breakpoint-function-disabled",60296),debugStackframeActive:s("debug-stackframe-active",60297),circleSmallFilled:s("circle-small-filled",60298),debugStackframeDot:s("debug-stackframe-dot",60298),terminalDecorationMark:s("terminal-decoration-mark",60298),debugStackframe:s("debug-stackframe",60299),debugStackframeFocused:s("debug-stackframe-focused",60299),debugBreakpointUnsupported:s("debug-breakpoint-unsupported",60300),symbolString:s("symbol-string",60301),debugReverseContinue:s("debug-reverse-continue",60302),debugStepBack:s("debug-step-back",60303),debugRestartFrame:s("debug-restart-frame",60304),debugAlt:s("debug-alt",60305),callIncoming:s("call-incoming",60306),callOutgoing:s("call-outgoing",60307),menu:s("menu",60308),expandAll:s("expand-all",60309),feedback:s("feedback",60310),gitPullRequestReviewer:s("git-pull-request-reviewer",60310),groupByRefType:s("group-by-ref-type",60311),ungroupByRefType:s("ungroup-by-ref-type",60312),account:s("account",60313),gitPullRequestAssignee:s("git-pull-request-assignee",60313),bellDot:s("bell-dot",60314),debugConsole:s("debug-console",60315),library:s("library",60316),output:s("output",60317),runAll:s("run-all",60318),syncIgnored:s("sync-ignored",60319),pinned:s("pinned",60320),githubInverted:s("github-inverted",60321),serverProcess:s("server-process",60322),serverEnvironment:s("server-environment",60323),pass:s("pass",60324),issueClosed:s("issue-closed",60324),stopCircle:s("stop-circle",60325),playCircle:s("play-circle",60326),record:s("record",60327),debugAltSmall:s("debug-alt-small",60328),vmConnect:s("vm-connect",60329),cloud:s("cloud",60330),merge:s("merge",60331),export:s("export",60332),graphLeft:s("graph-left",60333),magnet:s("magnet",60334),notebook:s("notebook",60335),redo:s("redo",60336),checkAll:s("check-all",60337),pinnedDirty:s("pinned-dirty",60338),passFilled:s("pass-filled",60339),circleLargeFilled:s("circle-large-filled",60340),circleLarge:s("circle-large",60341),circleLargeOutline:s("circle-large-outline",60341),combine:s("combine",60342),gather:s("gather",60342),table:s("table",60343),variableGroup:s("variable-group",60344),typeHierarchy:s("type-hierarchy",60345),typeHierarchySub:s("type-hierarchy-sub",60346),typeHierarchySuper:s("type-hierarchy-super",60347),gitPullRequestCreate:s("git-pull-request-create",60348),runAbove:s("run-above",60349),runBelow:s("run-below",60350),notebookTemplate:s("notebook-template",60351),debugRerun:s("debug-rerun",60352),workspaceTrusted:s("workspace-trusted",60353),workspaceUntrusted:s("workspace-untrusted",60354),workspaceUnknown:s("workspace-unknown",60355),terminalCmd:s("terminal-cmd",60356),terminalDebian:s("terminal-debian",60357),terminalLinux:s("terminal-linux",60358),terminalPowershell:s("terminal-powershell",60359),terminalTmux:s("terminal-tmux",60360),terminalUbuntu:s("terminal-ubuntu",60361),terminalBash:s("terminal-bash",60362),arrowSwap:s("arrow-swap",60363),copy:s("copy",60364),personAdd:s("person-add",60365),filterFilled:s("filter-filled",60366),wand:s("wand",60367),debugLineByLine:s("debug-line-by-line",60368),inspect:s("inspect",60369),layers:s("layers",60370),layersDot:s("layers-dot",60371),layersActive:s("layers-active",60372),compass:s("compass",60373),compassDot:s("compass-dot",60374),compassActive:s("compass-active",60375),azure:s("azure",60376),issueDraft:s("issue-draft",60377),gitPullRequestClosed:s("git-pull-request-closed",60378),gitPullRequestDraft:s("git-pull-request-draft",60379),debugAll:s("debug-all",60380),debugCoverage:s("debug-coverage",60381),runErrors:s("run-errors",60382),folderLibrary:s("folder-library",60383),debugContinueSmall:s("debug-continue-small",60384),beakerStop:s("beaker-stop",60385),graphLine:s("graph-line",60386),graphScatter:s("graph-scatter",60387),pieChart:s("pie-chart",60388),bracket:s("bracket",60175),bracketDot:s("bracket-dot",60389),bracketError:s("bracket-error",60390),lockSmall:s("lock-small",60391),azureDevops:s("azure-devops",60392),verifiedFilled:s("verified-filled",60393),newline:s("newline",60394),layout:s("layout",60395),layoutActivitybarLeft:s("layout-activitybar-left",60396),layoutActivitybarRight:s("layout-activitybar-right",60397),layoutPanelLeft:s("layout-panel-left",60398),layoutPanelCenter:s("layout-panel-center",60399),layoutPanelJustify:s("layout-panel-justify",60400),layoutPanelRight:s("layout-panel-right",60401),layoutPanel:s("layout-panel",60402),layoutSidebarLeft:s("layout-sidebar-left",60403),layoutSidebarRight:s("layout-sidebar-right",60404),layoutStatusbar:s("layout-statusbar",60405),layoutMenubar:s("layout-menubar",60406),layoutCentered:s("layout-centered",60407),target:s("target",60408),indent:s("indent",60409),recordSmall:s("record-small",60410),errorSmall:s("error-small",60411),terminalDecorationError:s("terminal-decoration-error",60411),arrowCircleDown:s("arrow-circle-down",60412),arrowCircleLeft:s("arrow-circle-left",60413),arrowCircleRight:s("arrow-circle-right",60414),arrowCircleUp:s("arrow-circle-up",60415),layoutSidebarRightOff:s("layout-sidebar-right-off",60416),layoutPanelOff:s("layout-panel-off",60417),layoutSidebarLeftOff:s("layout-sidebar-left-off",60418),blank:s("blank",60419),heartFilled:s("heart-filled",60420),map:s("map",60421),mapHorizontal:s("map-horizontal",60421),foldHorizontal:s("fold-horizontal",60421),mapFilled:s("map-filled",60422),mapHorizontalFilled:s("map-horizontal-filled",60422),foldHorizontalFilled:s("fold-horizontal-filled",60422),circleSmall:s("circle-small",60423),bellSlash:s("bell-slash",60424),bellSlashDot:s("bell-slash-dot",60425),commentUnresolved:s("comment-unresolved",60426),gitPullRequestGoToChanges:s("git-pull-request-go-to-changes",60427),gitPullRequestNewChanges:s("git-pull-request-new-changes",60428),searchFuzzy:s("search-fuzzy",60429),commentDraft:s("comment-draft",60430),send:s("send",60431),sparkle:s("sparkle",60432),insert:s("insert",60433),mic:s("mic",60434),thumbsdownFilled:s("thumbsdown-filled",60435),thumbsupFilled:s("thumbsup-filled",60436),coffee:s("coffee",60437),snake:s("snake",60438),game:s("game",60439),vr:s("vr",60440),chip:s("chip",60441),piano:s("piano",60442),music:s("music",60443),micFilled:s("mic-filled",60444),repoFetch:s("repo-fetch",60445),copilot:s("copilot",60446),lightbulbSparkle:s("lightbulb-sparkle",60447),robot:s("robot",60448),sparkleFilled:s("sparkle-filled",60449),diffSingle:s("diff-single",60450),diffMultiple:s("diff-multiple",60451),surroundWith:s("surround-with",60452),share:s("share",60453),gitStash:s("git-stash",60454),gitStashApply:s("git-stash-apply",60455),gitStashPop:s("git-stash-pop",60456),vscode:s("vscode",60457),vscodeInsiders:s("vscode-insiders",60458),codeOss:s("code-oss",60459),runCoverage:s("run-coverage",60460),runAllCoverage:s("run-all-coverage",60461),coverage:s("coverage",60462),githubProject:s("github-project",60463),mapVertical:s("map-vertical",60464),foldVertical:s("fold-vertical",60464),mapVerticalFilled:s("map-vertical-filled",60465),foldVerticalFilled:s("fold-vertical-filled",60465),goToSearch:s("go-to-search",60466),percentage:s("percentage",60467),sortPercentage:s("sort-percentage",60467),attach:s("attach",60468),dialogError:s("dialog-error","error"),dialogWarning:s("dialog-warning","warning"),dialogInfo:s("dialog-info","info"),dialogClose:s("dialog-close","close"),treeItemExpanded:s("tree-item-expanded","chevron-down"),treeFilterOnTypeOn:s("tree-filter-on-type-on","list-filter"),treeFilterOnTypeOff:s("tree-filter-on-type-off","list-selection"),treeFilterClear:s("tree-filter-clear","close"),treeItemLoading:s("tree-item-loading","loading"),menuSelection:s("menu-selection","check"),menuSubmenu:s("menu-submenu","chevron-right"),menuBarMore:s("menubar-more","more"),scrollbarButtonLeft:s("scrollbar-button-left","triangle-left"),scrollbarButtonRight:s("scrollbar-button-right","triangle-right"),scrollbarButtonUp:s("scrollbar-button-up","triangle-up"),scrollbarButtonDown:s("scrollbar-button-down","triangle-down"),toolBarMore:s("toolbar-more","more"),quickInputBack:s("quick-input-back","arrow-left"),dropDownButton:s("drop-down-button",60084),symbolCustomColor:s("symbol-customcolor",60252),exportIcon:s("export",60332),workspaceUnspecified:s("workspace-unspecified",60355),newLine:s("newline",60394),thumbsDownFilled:s("thumbsdown-filled",60435),thumbsUpFilled:s("thumbsup-filled",60436),gitFetch:s("git-fetch",60445),lightbulbSparkleAutofix:s("lightbulb-sparkle-autofix",60447),debugBreakpointPending:s("debug-breakpoint-pending",60377)}},4901:(e,t,n)=>{"use strict";function i(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}n.d(t,{Q1:()=>a,bU:()=>r,hB:()=>s});class r{constructor(e,t,n,r=1){this._rgbaBrand=void 0,this.r=0|Math.min(255,Math.max(0,e)),this.g=0|Math.min(255,Math.max(0,t)),this.b=0|Math.min(255,Math.max(0,n)),this.a=i(Math.max(Math.min(1,r),0),3)}static equals(e,t){return e.r===t.r&&e.g===t.g&&e.b===t.b&&e.a===t.a}}class s{constructor(e,t,n,r){this._hslaBrand=void 0,this.h=0|Math.max(Math.min(360,e),0),this.s=i(Math.max(Math.min(1,t),0),3),this.l=i(Math.max(Math.min(1,n),0),3),this.a=i(Math.max(Math.min(1,r),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.l===t.l&&e.a===t.a}static fromRGBA(e){const t=e.r/255,n=e.g/255,i=e.b/255,r=e.a,o=Math.max(t,n,i),a=Math.min(t,n,i);let l=0,h=0;const u=(a+o)/2,c=o-a;if(c>0){switch(h=Math.min(u<=.5?c/(2*u):c/(2-2*u),1),o){case t:l=(n-i)/c+(n<i?6:0);break;case n:l=(i-t)/c+2;break;case i:l=(t-n)/c+4}l*=60,l=Math.round(l)}return new s(l,h,u,r)}static _hue2rgb(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}static toRGBA(e){const t=e.h/360,{s:n,l:i,a:o}=e;let a,l,h;if(0===n)a=l=h=i;else{const e=i<.5?i*(1+n):i+n-i*n,r=2*i-e;a=s._hue2rgb(r,e,t+1/3),l=s._hue2rgb(r,e,t),h=s._hue2rgb(r,e,t-1/3)}return new r(Math.round(255*a),Math.round(255*l),Math.round(255*h),o)}}class o{constructor(e,t,n,r){this._hsvaBrand=void 0,this.h=0|Math.max(Math.min(360,e),0),this.s=i(Math.max(Math.min(1,t),0),3),this.v=i(Math.max(Math.min(1,n),0),3),this.a=i(Math.max(Math.min(1,r),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.v===t.v&&e.a===t.a}static fromRGBA(e){const t=e.r/255,n=e.g/255,i=e.b/255,r=Math.max(t,n,i),s=r-Math.min(t,n,i),a=0===r?0:s/r;let l;return l=0===s?0:r===t?((n-i)/s%6+6)%6:r===n?(i-t)/s+2:(t-n)/s+4,new o(Math.round(60*l),a,r,e.a)}static toRGBA(e){const{h:t,s:n,v:i,a:s}=e,o=i*n,a=o*(1-Math.abs(t/60%2-1)),l=i-o;let[h,u,c]=[0,0,0];return t<60?(h=o,u=a):t<120?(h=a,u=o):t<180?(u=o,c=a):t<240?(u=a,c=o):t<300?(h=a,c=o):t<=360&&(h=o,c=a),h=Math.round(255*(h+l)),u=Math.round(255*(u+l)),c=Math.round(255*(c+l)),new r(h,u,c,s)}}class a{static fromHex(e){return a.Format.CSS.parseHex(e)||a.red}static equals(e,t){return!e&&!t||!(!e||!t)&&e.equals(t)}get hsla(){return this._hsla?this._hsla:s.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:o.fromRGBA(this.rgba)}constructor(e){if(!e)throw new Error("Color needs a value");if(e instanceof r)this.rgba=e;else if(e instanceof s)this._hsla=e,this.rgba=s.toRGBA(e);else{if(!(e instanceof o))throw new Error("Invalid color ctor argument");this._hsva=e,this.rgba=o.toRGBA(e)}}equals(e){return!!e&&r.equals(this.rgba,e.rgba)&&s.equals(this.hsla,e.hsla)&&o.equals(this.hsva,e.hsva)}getRelativeLuminance(){return i(.2126*a._relativeLuminanceForComponent(this.rgba.r)+.7152*a._relativeLuminanceForComponent(this.rgba.g)+.0722*a._relativeLuminanceForComponent(this.rgba.b),4)}static _relativeLuminanceForComponent(e){const t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}isLighter(){return(299*this.rgba.r+587*this.rgba.g+114*this.rgba.b)/1e3>=128}isLighterThan(e){return this.getRelativeLuminance()>e.getRelativeLuminance()}isDarkerThan(e){return this.getRelativeLuminance()<e.getRelativeLuminance()}lighten(e){return new a(new s(this.hsla.h,this.hsla.s,this.hsla.l+this.hsla.l*e,this.hsla.a))}darken(e){return new a(new s(this.hsla.h,this.hsla.s,this.hsla.l-this.hsla.l*e,this.hsla.a))}transparent(e){const{r:t,g:n,b:i,a:s}=this.rgba;return new a(new r(t,n,i,s*e))}isTransparent(){return 0===this.rgba.a}isOpaque(){return 1===this.rgba.a}opposite(){return new a(new r(255-this.rgba.r,255-this.rgba.g,255-this.rgba.b,this.rgba.a))}makeOpaque(e){if(this.isOpaque()||1!==e.rgba.a)return this;const{r:t,g:n,b:i,a:s}=this.rgba;return new a(new r(e.rgba.r-s*(e.rgba.r-t),e.rgba.g-s*(e.rgba.g-n),e.rgba.b-s*(e.rgba.b-i),1))}toString(){return this._toString||(this._toString=a.Format.CSS.format(this)),this._toString}static getLighterColor(e,t,n){if(e.isLighterThan(t))return e;n=n||.5;const i=e.getRelativeLuminance(),r=t.getRelativeLuminance();return n=n*(r-i)/r,e.lighten(n)}static getDarkerColor(e,t,n){if(e.isDarkerThan(t))return e;n=n||.5;const i=e.getRelativeLuminance();return n=n*(i-t.getRelativeLuminance())/i,e.darken(n)}static{this.white=new a(new r(255,255,255,1))}static{this.black=new a(new r(0,0,0,1))}static{this.red=new a(new r(255,0,0,1))}static{this.blue=new a(new r(0,0,255,1))}static{this.green=new a(new r(0,255,0,1))}static{this.cyan=new a(new r(0,255,255,1))}static{this.lightgrey=new a(new r(211,211,211,1))}static{this.transparent=new a(new r(0,0,0,0))}}!function(e){let t;!function(t){let n;!function(t){function n(e){const t=e.toString(16);return 2!==t.length?"0"+t:t}function i(e){switch(e){case 48:return 0;case 49:return 1;case 50:return 2;case 51:return 3;case 52:return 4;case 53:return 5;case 54:return 6;case 55:return 7;case 56:return 8;case 57:return 9;case 97:case 65:return 10;case 98:case 66:return 11;case 99:case 67:return 12;case 100:case 68:return 13;case 101:case 69:return 14;case 102:case 70:return 15}return 0}t.formatRGB=function(t){return 1===t.rgba.a?`rgb(${t.rgba.r}, ${t.rgba.g}, ${t.rgba.b})`:e.Format.CSS.formatRGBA(t)},t.formatRGBA=function(e){return`rgba(${e.rgba.r}, ${e.rgba.g}, ${e.rgba.b}, ${+e.rgba.a.toFixed(2)})`},t.formatHSL=function(t){return 1===t.hsla.a?`hsl(${t.hsla.h}, ${(100*t.hsla.s).toFixed(2)}%, ${(100*t.hsla.l).toFixed(2)}%)`:e.Format.CSS.formatHSLA(t)},t.formatHSLA=function(e){return`hsla(${e.hsla.h}, ${(100*e.hsla.s).toFixed(2)}%, ${(100*e.hsla.l).toFixed(2)}%, ${e.hsla.a.toFixed(2)})`},t.formatHex=function(e){return`#${n(e.rgba.r)}${n(e.rgba.g)}${n(e.rgba.b)}`},t.formatHexA=function(t,i=!1){return i&&1===t.rgba.a?e.Format.CSS.formatHex(t):`#${n(t.rgba.r)}${n(t.rgba.g)}${n(t.rgba.b)}${n(Math.round(255*t.rgba.a))}`},t.format=function(t){return t.isOpaque()?e.Format.CSS.formatHex(t):e.Format.CSS.formatRGBA(t)},t.parseHex=function(t){const n=t.length;if(0===n)return null;if(35!==t.charCodeAt(0))return null;if(7===n){const n=16*i(t.charCodeAt(1))+i(t.charCodeAt(2)),s=16*i(t.charCodeAt(3))+i(t.charCodeAt(4)),o=16*i(t.charCodeAt(5))+i(t.charCodeAt(6));return new e(new r(n,s,o,1))}if(9===n){const n=16*i(t.charCodeAt(1))+i(t.charCodeAt(2)),s=16*i(t.charCodeAt(3))+i(t.charCodeAt(4)),o=16*i(t.charCodeAt(5))+i(t.charCodeAt(6)),a=16*i(t.charCodeAt(7))+i(t.charCodeAt(8));return new e(new r(n,s,o,a/255))}if(4===n){const n=i(t.charCodeAt(1)),s=i(t.charCodeAt(2)),o=i(t.charCodeAt(3));return new e(new r(16*n+n,16*s+s,16*o+o))}if(5===n){const n=i(t.charCodeAt(1)),s=i(t.charCodeAt(2)),o=i(t.charCodeAt(3)),a=i(t.charCodeAt(4));return new e(new r(16*n+n,16*s+s,16*o+o,(16*a+a)/255))}return null}}(n=t.CSS||(t.CSS={}))}(t=e.Format||(e.Format={}))}(a||(a={}))},4327:(e,t,n)=>{"use strict";n.d(t,{D7:()=>d,EM:()=>u,Qg:()=>l,cU:()=>s,dz:()=>r,iH:()=>h});const i=new class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout((()=>{if(e.stack){if(c.isErrorNoTelemetry(e))throw new c(e.message+"\n\n"+e.stack);throw new Error(e.message+"\n\n"+e.stack)}throw e}),0)}}emit(e){this.listeners.forEach((t=>{t(e)}))}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}};function r(e){var t;(t=e)instanceof a||t instanceof Error&&t.name===o&&t.message===o||i.onUnexpectedError(e)}function s(e){if(e instanceof Error){const{name:t,message:n}=e;return{$isError:!0,name:t,message:n,stack:e.stacktrace||e.stack,noTelemetry:c.isErrorNoTelemetry(e)}}return e}const o="Canceled";class a extends Error{constructor(){super(o),this.name=this.message}}function l(e){return e?new Error(`Illegal argument: ${e}`):new Error("Illegal argument")}function h(e){return e?new Error(`Illegal state: ${e}`):new Error("Illegal state")}class u extends Error{constructor(e){super("NotSupported"),e&&(this.message=e)}}class c extends Error{constructor(e){super(e),this.name="CodeExpectedError"}static fromError(e){if(e instanceof c)return e;const t=new c;return t.message=e.message,t.stack=e.stack,t}static isErrorNoTelemetry(e){return"CodeExpectedError"===e.name}}class d extends Error{constructor(e){super(e||"An unexpected bug occurred."),Object.setPrototypeOf(this,d.prototype)}}},2106:(e,t,n)=>{"use strict";n.d(t,{Jh:()=>i,vl:()=>g});var i,r=n(4327),s=n(9235),o=(n(5525),n(3013));!function(e){function t(e){return(t,n=null,i)=>{let r,s=!1;return r=e((e=>{if(!s)return r?r.dispose():s=!0,t.call(n,e)}),null,i),s&&r.dispose(),r}}function n(e,t,n){return r(((n,i=null,r)=>e((e=>n.call(i,t(e))),null,r)),n)}function i(e,t,n){return r(((n,i=null,r)=>e((e=>t(e)&&n.call(i,e)),null,r)),n)}function r(e,t){let n;const i=new g({onWillAddFirstListener(){n=e(i.fire,i)},onDidRemoveLastListener(){n?.dispose()}});return t?.add(i),i.event}function o(e,t,n=100,i=!1,r=!1,s,o){let a,l,h,u,c=0;const d=new g({leakWarningThreshold:s,onWillAddFirstListener(){a=e((e=>{c++,l=t(l,e),i&&!h&&(d.fire(l),l=void 0),u=()=>{const e=l;l=void 0,h=void 0,(!i||c>1)&&d.fire(e),c=0},"number"==typeof n?(clearTimeout(h),h=setTimeout(u,n)):void 0===h&&(h=0,queueMicrotask(u))}))},onWillRemoveListener(){r&&c>0&&u?.()},onDidRemoveLastListener(){u=void 0,a.dispose()}});return o?.add(d),d.event}e.None=()=>s.jG.None,e.defer=function(e,t){return o(e,(()=>{}),0,void 0,!0,void 0,t)},e.once=t,e.onceIf=function(t,n){return e.once(e.filter(t,n))},e.map=n,e.forEach=function(e,t,n){return r(((n,i=null,r)=>e((e=>{t(e),n.call(i,e)}),null,r)),n)},e.filter=i,e.signal=function(e){return e},e.any=function(...e){return(t,n=null,i)=>{return r=(0,s.qE)(...e.map((e=>e((e=>t.call(n,e)))))),(o=i)instanceof Array?o.push(r):o&&o.add(r),r;var r,o}},e.reduce=function(e,t,i,r){let s=i;return n(e,(e=>(s=t(s,e),s)),r)},e.debounce=o,e.accumulate=function(t,n=0,i){return e.debounce(t,((e,t)=>e?(e.push(t),e):[t]),n,void 0,!0,void 0,i)},e.latch=function(e,t=(e,t)=>e===t,n){let r,s=!0;return i(e,(e=>{const n=s||!t(e,r);return s=!1,r=e,n}),n)},e.split=function(t,n,i){return[e.filter(t,n,i),e.filter(t,(e=>!n(e)),i)]},e.buffer=function(e,t=!1,n=[],i){let r=n.slice(),s=e((e=>{r?r.push(e):a.fire(e)}));i&&i.add(s);const o=()=>{r?.forEach((e=>a.fire(e))),r=null},a=new g({onWillAddFirstListener(){s||(s=e((e=>a.fire(e))),i&&i.add(s))},onDidAddFirstListener(){r&&(t?setTimeout(o):o())},onDidRemoveLastListener(){s&&s.dispose(),s=null}});return i&&i.add(a),a.event},e.chain=function(e,t){return(n,i,r)=>{const s=t(new l);return e((function(e){const t=s.evaluate(e);t!==a&&n.call(i,t)}),void 0,r)}};const a=Symbol("HaltChainable");class l{constructor(){this.steps=[]}map(e){return this.steps.push(e),this}forEach(e){return this.steps.push((t=>(e(t),t))),this}filter(e){return this.steps.push((t=>e(t)?t:a)),this}reduce(e,t){let n=t;return this.steps.push((t=>(n=e(n,t),n))),this}latch(e=(e,t)=>e===t){let t,n=!0;return this.steps.push((i=>{const r=n||!e(i,t);return n=!1,t=i,r?i:a})),this}evaluate(e){for(const t of this.steps)if((e=t(e))===a)break;return e}}e.fromNodeEventEmitter=function(e,t,n=e=>e){const i=(...e)=>r.fire(n(...e)),r=new g({onWillAddFirstListener:()=>e.on(t,i),onDidRemoveLastListener:()=>e.removeListener(t,i)});return r.event},e.fromDOMEventEmitter=function(e,t,n=e=>e){const i=(...e)=>r.fire(n(...e)),r=new g({onWillAddFirstListener:()=>e.addEventListener(t,i),onDidRemoveLastListener:()=>e.removeEventListener(t,i)});return r.event},e.toPromise=function(e){return new Promise((n=>t(e)(n)))},e.fromPromise=function(e){const t=new g;return e.then((e=>{t.fire(e)}),(()=>{t.fire(void 0)})).finally((()=>{t.dispose()})),t.event},e.forward=function(e,t){return e((e=>t.fire(e)))},e.runAndSubscribe=function(e,t,n){return t(n),e((e=>t(e)))};class h{constructor(e,t){this._observable=e,this._counter=0,this._hasChanged=!1;const n={onWillAddFirstListener:()=>{e.addObserver(this),this._observable.reportChanges()},onDidRemoveLastListener:()=>{e.removeObserver(this)}};this.emitter=new g(n),t&&t.add(this.emitter)}beginUpdate(e){this._counter++}handlePossibleChange(e){}handleChange(e,t){this._hasChanged=!0}endUpdate(e){this._counter--,0===this._counter&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}e.fromObservable=function(e,t){return new h(e,t).emitter.event},e.fromObservableLight=function(e){return(t,n,i)=>{let r=0,o=!1;const a={beginUpdate(){r++},endUpdate(){r--,0===r&&(e.reportChanges(),o&&(o=!1,t.call(n)))},handlePossibleChange(){},handleChange(){o=!0}};e.addObserver(a),e.reportChanges();const l={dispose(){e.removeObserver(a)}};return i instanceof s.Cm?i.add(l):Array.isArray(i)&&i.push(l),l}}}(i||(i={}));class a{static{this.all=new Set}static{this._idPool=0}constructor(e){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${e}_${a._idPool++}`,a.all.add(this)}start(e){this._stopWatch=new o.W,this.listenerCount=e}stop(){if(this._stopWatch){const e=this._stopWatch.elapsed();this.durations.push(e),this.elapsedOverall+=e,this.invocationCount+=1,this._stopWatch=void 0}}}class l{static{this._idPool=1}constructor(e,t,n=(l._idPool++).toString(16).padStart(3,"0")){this._errorHandler=e,this.threshold=t,this.name=n,this._warnCountdown=0}dispose(){this._stacks?.clear()}check(e,t){const n=this.threshold;if(n<=0||t<n)return;this._stacks||(this._stacks=new Map);const i=this._stacks.get(e.value)||0;if(this._stacks.set(e.value,i+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=.5*n;const[e,i]=this.getMostFrequentStack(),r=`[${this.name}] potential listener LEAK detected, having ${t} listeners already. MOST frequent listener (${i}):`;console.warn(r),console.warn(e);const s=new u(r,e);this._errorHandler(s)}return()=>{const t=this._stacks.get(e.value)||0;this._stacks.set(e.value,t-1)}}getMostFrequentStack(){if(!this._stacks)return;let e,t=0;for(const[n,i]of this._stacks)(!e||t<i)&&(e=[n,i],t=i);return e}}class h{static create(){const e=new Error;return new h(e.stack??"")}constructor(e){this.value=e}print(){console.warn(this.value.split("\n").slice(2).join("\n"))}}class u extends Error{constructor(e,t){super(e),this.name="ListenerLeakError",this.stack=t}}class c extends Error{constructor(e,t){super(e),this.name="ListenerRefusalError",this.stack=t}}class d{constructor(e){this.value=e}}class g{constructor(e){this._size=0,this._options=e,this._leakageMon=this._options?.leakWarningThreshold?new l(e?.onListenerError??r.dz,this._options?.leakWarningThreshold??-1):void 0,this._perfMon=this._options?._profName?new a(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){this._disposed||(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners&&(this._listeners=void 0,this._size=0),this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose())}get event(){return this._event??=(e,t,n)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){const e=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(e);const t=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],n=new c(`${e}. HINT: Stack shows most frequent listener (${t[1]}-times)`,t[0]);return(this._options?.onListenerError||r.dz)(n),s.jG.None}if(this._disposed)return s.jG.None;t&&(e=e.bind(t));const i=new d(e);let o;this._leakageMon&&this._size>=Math.ceil(.2*this._leakageMon.threshold)&&(i.stack=h.create(),o=this._leakageMon.check(i.stack,this._size+1)),this._listeners?this._listeners instanceof d?(this._deliveryQueue??=new f,this._listeners=[this._listeners,i]):this._listeners.push(i):(this._options?.onWillAddFirstListener?.(this),this._listeners=i,this._options?.onDidAddFirstListener?.(this)),this._size++;const a=(0,s.s)((()=>{o?.(),this._removeListener(i)}));return n instanceof s.Cm?n.add(a):Array.isArray(n)&&n.push(a),a},this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(1===this._size)return this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),void(this._size=0);const t=this._listeners,n=t.indexOf(e);if(-1===n)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,t[n]=void 0;const i=this._deliveryQueue.current===this;if(2*this._size<=t.length){let e=0;for(let n=0;n<t.length;n++)t[n]?t[e++]=t[n]:i&&(this._deliveryQueue.end--,e<this._deliveryQueue.i&&this._deliveryQueue.i--);t.length=e}}_deliver(e,t){if(!e)return;const n=this._options?.onListenerError||r.dz;if(n)try{e.value(t)}catch(e){n(e)}else e.value(t)}_deliverQueue(e){const t=e.current._listeners;for(;e.i<e.end;)this._deliver(t[e.i++],e.value);e.reset()}fire(e){if(this._deliveryQueue?.current&&(this._deliverQueue(this._deliveryQueue),this._perfMon?.stop()),this._perfMon?.start(this._size),this._listeners)if(this._listeners instanceof d)this._deliver(this._listeners,e);else{const t=this._deliveryQueue;t.enqueue(this,e,this._listeners.length),this._deliverQueue(t)}this._perfMon?.stop()}hasListeners(){return this._size>0}}class f{constructor(){this.i=-1,this.end=0}enqueue(e,t,n){this.i=0,this.end=n,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}}},8518:(e,t,n)=>{"use strict";n.d(t,{TH:()=>o,Zn:()=>l,_1:()=>h,kb:()=>a});var i=n(4033),r=(n(3339),n(6844));function s(e){return 47===e||92===e}function o(e){return e.replace(/[\\/]/g,i.SA.sep)}function a(e){return-1===e.indexOf("/")&&(e=o(e)),/^[a-zA-Z]:(\/|$)/.test(e)&&(e="/"+e),e}function l(e,t=i.SA.sep){if(!e)return"";const n=e.length,r=e.charCodeAt(0);if(s(r)){if(s(e.charCodeAt(1))&&!s(e.charCodeAt(2))){let i=3;const r=i;for(;i<n&&!s(e.charCodeAt(i));i++);if(r!==i&&!s(e.charCodeAt(i+1)))for(i+=1;i<n;i++)if(s(e.charCodeAt(i)))return e.slice(0,i+1).replace(/[\\/]/g,t)}return t}if(((o=r)>=65&&o<=90||o>=97&&o<=122)&&58===e.charCodeAt(1))return s(e.charCodeAt(2))?e.slice(0,2)+t:e.slice(0,2);var o;let a=e.indexOf("://");if(-1!==a)for(a+=3;a<n;a++)if(s(e.charCodeAt(a)))return e.slice(0,a+1);return""}function h(e,t,n,s=i.Vn){if(e===t)return!0;if(!e||!t)return!1;if(t.length>e.length)return!1;if(n){if(!(0,r.ns)(e,t))return!1;if(t.length===e.length)return!0;let n=t.length;return t.charAt(t.length-1)===s&&n--,e.charAt(n)===s}return t.charAt(t.length-1)!==s&&(t+=s),0===e.indexOf(t)}},3958:(e,t,n)=>{"use strict";n.d(t,{YW:()=>I,qg:()=>T});var i=n(1946),r=n(8518),s=n(7992),o=n(4033),a=n(3339),l=n(6844);const h="**",u="/",c="[/\\\\]",d="[^/\\\\]",g=/\//g;function f(e,t){switch(e){case 0:return"";case 1:return`${d}*?`;default:return`(?:${c}|${d}+${c}${t?`|${c}${d}+`:""})*?`}}function m(e,t){if(!e)return[];const n=[];let i=!1,r=!1,s="";for(const o of e){switch(o){case t:if(!i&&!r){n.push(s),s="";continue}break;case"{":i=!0;break;case"}":i=!1;break;case"[":r=!0;break;case"]":r=!1}s+=o}return s&&n.push(s),n}function p(e){if(!e)return"";let t="";const n=m(e,u);if(n.every((e=>e===h)))t=".*";else{let e=!1;n.forEach(((i,r)=>{if(i===h){if(e)return;t+=f(2,r===n.length-1)}else{let e=!1,s="",o=!1,a="";for(const n of i)if("}"!==n&&e)s+=n;else if(!o||"]"===n&&a)switch(n){case"{":e=!0;continue;case"[":o=!0;continue;case"}":{const n=`(?:${m(s,",").map((e=>p(e))).join("|")})`;t+=n,e=!1,s="";break}case"]":t+="["+a+"]",o=!1,a="";break;case"?":t+=d;continue;case"*":t+=f(1);continue;default:t+=(0,l.bm)(n)}else{let e;e="-"===n?n:"^"!==n&&"!"!==n||a?n===u?"":(0,l.bm)(n):"^",a+=e}r<n.length-1&&(n[r+1]!==h||r+2<n.length)&&(t+=c)}e=i===h}))}return t}const _=/^\*\*\/\*\.[\w\.-]+$/,b=/^\*\*\/([\w\.-]+)\/?$/,k=/^{\*\*\/\*?[\w\.-]+\/?(,\*\*\/\*?[\w\.-]+\/?)*}$/,C=/^{\*\*\/\*?[\w\.-]+(\/(\*\*)?)?(,\*\*\/\*?[\w\.-]+(\/(\*\*)?)?)*}$/,v=/^\*\*((\/[\w\.-]+)+)\/?$/,L=/^([\w\.-]+(\/[\w\.-]+)*)\/?$/,w=new s.qK(1e4),y=function(){return!1},S=function(){return null};function x(e,t){if(!e)return S;let n;n="string"!=typeof e?e.pattern:e,n=n.trim();const i=`${n}_${!!t.trimForExclusions}`;let s,h=w.get(i);return h||(h=_.test(n)?function(e,t){return function(n,i){return"string"==typeof n&&n.endsWith(e)?t:null}}(n.substr(4),n):(s=b.exec(E(n,t)))?function(e,t){const n=`/${e}`,i=`\\${e}`,r=function(r,s){return"string"!=typeof r?null:s?s===e?t:null:r===e||r.endsWith(n)||r.endsWith(i)?t:null},s=[e];return r.basenames=s,r.patterns=[t],r.allBasenames=s,r}(s[1],n):(t.trimForExclusions?C:k).test(n)?function(e,t){const n=A(e.slice(1,-1).split(",").map((e=>x(e,t))).filter((e=>e!==S)),e),i=n.length;if(!i)return S;if(1===i)return n[0];const r=function(t,i){for(let r=0,s=n.length;r<s;r++)if(n[r](t,i))return e;return null},s=n.find((e=>!!e.allBasenames));s&&(r.allBasenames=s.allBasenames);const o=n.reduce(((e,t)=>t.allPaths?e.concat(t.allPaths):e),[]);return o.length&&(r.allPaths=o),r}(n,t):(s=v.exec(E(n,t)))?N(s[1].substr(1),n,!0):(s=L.exec(E(n,t)))?N(s[1],n,!1):function(e){try{const t=new RegExp(`^${p(e)}$`);return function(n){return t.lastIndex=0,"string"==typeof n&&t.test(n)?e:null}}catch(e){return S}}(n),w.set(i,h)),function(e,t){if("string"==typeof t)return e;const n=function(n,i){return(0,r._1)(n,t.base,!a.j9)?e((0,l.NB)(n.substr(t.base.length),o.Vn),i):null};return n.allBasenames=e.allBasenames,n.allPaths=e.allPaths,n.basenames=e.basenames,n.patterns=e.patterns,n}(h,e)}function E(e,t){return t.trimForExclusions&&e.endsWith("/**")?e.substr(0,e.length-2):e}function N(e,t,n){const i=o.Vn===o.SA.sep,r=i?e:e.replace(g,o.Vn),s=o.Vn+r,a=o.SA.sep+e;let l;return l=n?function(n,o){return"string"!=typeof n||n!==r&&!n.endsWith(s)&&(i||n!==e&&!n.endsWith(a))?null:t}:function(n,s){return"string"!=typeof n||n!==r&&(i||n!==e)?null:t},l.allPaths=[(n?"*/":"./")+e],l}function I(e,t,n){return!(!e||"string"!=typeof t)&&T(e)(t,void 0,n)}function T(e,t={}){if(!e)return y;if("string"==typeof e||function(e){const t=e;return!!t&&("string"==typeof t.base&&"string"==typeof t.pattern)}(e)){const n=x(e,t);if(n===S)return y;const i=function(e,t){return!!n(e,t)};return n.allBasenames&&(i.allBasenames=n.allBasenames),n.allPaths&&(i.allPaths=n.allPaths),i}return function(e,t){const n=A(Object.getOwnPropertyNames(e).map((n=>function(e,t,n){if(!1===t)return S;const r=x(e,n);if(r===S)return S;if("boolean"==typeof t)return r;if(t){const n=t.when;if("string"==typeof n){const t=(t,s,o,a)=>{if(!a||!r(t,s))return null;const l=a(n.replace("$(basename)",(()=>o)));return(0,i.Qg)(l)?l.then((t=>t?e:null)):l?e:null};return t.requiresSiblings=!0,t}}return r}(n,e[n],t))).filter((e=>e!==S))),r=n.length;if(!r)return S;if(!n.some((e=>!!e.requiresSiblings))){if(1===r)return n[0];const e=function(e,t){let r;for(let s=0,o=n.length;s<o;s++){const o=n[s](e,t);if("string"==typeof o)return o;(0,i.Qg)(o)&&(r||(r=[]),r.push(o))}return r?(async()=>{for(const e of r){const t=await e;if("string"==typeof t)return t}return null})():null},t=n.find((e=>!!e.allBasenames));t&&(e.allBasenames=t.allBasenames);const s=n.reduce(((e,t)=>t.allPaths?e.concat(t.allPaths):e),[]);return s.length&&(e.allPaths=s),e}const s=function(e,t,r){let s,a;for(let l=0,h=n.length;l<h;l++){const h=n[l];h.requiresSiblings&&r&&(t||(t=(0,o.P8)(e)),s||(s=t.substr(0,t.length-(0,o.LC)(e).length)));const u=h(e,t,s,r);if("string"==typeof u)return u;(0,i.Qg)(u)&&(a||(a=[]),a.push(u))}return a?(async()=>{for(const e of a){const t=await e;if("string"==typeof t)return t}return null})():null},a=n.find((e=>!!e.allBasenames));a&&(s.allBasenames=a.allBasenames);const l=n.reduce(((e,t)=>t.allPaths?e.concat(t.allPaths):e),[]);return l.length&&(s.allPaths=l),s}(e,t)}function A(e,t){const n=e.filter((e=>!!e.basenames));if(n.length<2)return e;const i=n.reduce(((e,t)=>{const n=t.basenames;return n?e.concat(n):e}),[]);let r;if(t){r=[];for(let e=0,n=i.length;e<n;e++)r.push(t)}else r=n.reduce(((e,t)=>{const n=t.patterns;return n?e.concat(n):e}),[]);const s=function(e,t){if("string"!=typeof e)return null;if(!t){let n;for(n=e.length;n>0;n--){const t=e.charCodeAt(n-1);if(47===t||92===t)break}t=e.substr(n)}const n=i.indexOf(t);return-1!==n?r[n]:null};s.basenames=i,s.patterns=r,s.allBasenames=i;const o=e.filter((e=>!e.basenames));return o.push(s),o}},2344:(e,t,n)=>{"use strict";n.d(t,{e2:()=>o,sN:()=>r,v7:()=>u});var i=n(6844);function r(e,t){switch(typeof e){case"object":return null===e?s(349,t):Array.isArray(e)?(n=e,i=s(104579,i=t),n.reduce(((e,t)=>r(t,e)),i)):function(e,t){return t=s(181387,t),Object.keys(e).sort().reduce(((t,n)=>(t=o(n,t),r(e[n],t))),t)}(e,t);case"string":return o(e,t);case"boolean":return function(e,t){return s(e?433:863,t)}(e,t);case"number":return s(e,t);case"undefined":return s(937,t);default:return s(617,t)}var n,i}function s(e,t){return(t<<5)-t+e|0}function o(e,t){t=s(149417,t);for(let n=0,i=e.length;n<i;n++)t=s(e.charCodeAt(n),t);return t}function a(e,t,n=32){const i=n-t;return(e<<t|(~((1<<i)-1)&e)>>>i)>>>0}function l(e,t=0,n=e.byteLength,i=0){for(let r=0;r<n;r++)e[t+r]=i}function h(e,t=32){return e instanceof ArrayBuffer?Array.from(new Uint8Array(e)).map((e=>e.toString(16).padStart(2,"0"))).join(""):function(e,t,n="0"){for(;e.length<t;)e=n+e;return e}((e>>>0).toString(16),t/4)}class u{static{this._bigBlock32=new DataView(new ArrayBuffer(320))}constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(67),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(e){const t=e.length;if(0===t)return;const n=this._buff;let r,s,o=this._buffLen,a=this._leftoverHighSurrogate;for(0!==a?(r=a,s=-1,a=0):(r=e.charCodeAt(0),s=0);;){let l=r;if(i.pc(r)){if(!(s+1<t)){a=r;break}{const t=e.charCodeAt(s+1);i.LJ(t)?(s++,l=i.z_(r,t)):l=65533}}else i.LJ(r)&&(l=65533);if(o=this._push(n,o,l),s++,!(s<t))break;r=e.charCodeAt(s)}this._buffLen=o,this._leftoverHighSurrogate=a}_push(e,t,n){return n<128?e[t++]=n:n<2048?(e[t++]=192|(1984&n)>>>6,e[t++]=128|(63&n)>>>0):n<65536?(e[t++]=224|(61440&n)>>>12,e[t++]=128|(4032&n)>>>6,e[t++]=128|(63&n)>>>0):(e[t++]=240|(1835008&n)>>>18,e[t++]=128|(258048&n)>>>12,e[t++]=128|(4032&n)>>>6,e[t++]=128|(63&n)>>>0),t>=64&&(this._step(),t-=64,this._totalLen+=64,e[0]=e[64],e[1]=e[65],e[2]=e[66]),t}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),h(this._h0)+h(this._h1)+h(this._h2)+h(this._h3)+h(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,l(this._buff,this._buffLen),this._buffLen>56&&(this._step(),l(this._buff));const e=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(e/4294967296),!1),this._buffDV.setUint32(60,e%4294967296,!1),this._step()}_step(){const e=u._bigBlock32,t=this._buffDV;for(let n=0;n<64;n+=4)e.setUint32(n,t.getUint32(n,!1),!1);for(let t=64;t<320;t+=4)e.setUint32(t,a(e.getUint32(t-12,!1)^e.getUint32(t-32,!1)^e.getUint32(t-56,!1)^e.getUint32(t-64,!1),1),!1);let n,i,r,s=this._h0,o=this._h1,l=this._h2,h=this._h3,c=this._h4;for(let t=0;t<80;t++)t<20?(n=o&l|~o&h,i=1518500249):t<40?(n=o^l^h,i=1859775393):t<60?(n=o&l|o&h|l&h,i=2400959708):(n=o^l^h,i=3395469782),r=a(s,5)+n+c+i+e.getUint32(4*t,!1)&4294967295,c=h,h=l,l=a(o,30),o=s,s=r;this._h0=this._h0+s&4294967295,this._h1=this._h1+o&4294967295,this._h2=this._h2+l&4294967295,this._h3=this._h3+h&4294967295,this._h4=this._h4+c&4294967295}}},7954:(e,t,n)=>{"use strict";var i;n.d(t,{f:()=>i}),function(e){function t(e){return e&&"object"==typeof e&&"function"==typeof e[Symbol.iterator]}e.is=t;const n=Object.freeze([]);function*i(e){yield e}e.empty=function(){return n},e.single=i,e.wrap=function(e){return t(e)?e:i(e)},e.from=function(e){return e||n},e.reverse=function*(e){for(let t=e.length-1;t>=0;t--)yield e[t]},e.isEmpty=function(e){return!e||!0===e[Symbol.iterator]().next().done},e.first=function(e){return e[Symbol.iterator]().next().value},e.some=function(e,t){let n=0;for(const i of e)if(t(i,n++))return!0;return!1},e.find=function(e,t){for(const n of e)if(t(n))return n},e.filter=function*(e,t){for(const n of e)t(n)&&(yield n)},e.map=function*(e,t){let n=0;for(const i of e)yield t(i,n++)},e.flatMap=function*(e,t){let n=0;for(const i of e)yield*t(i,n++)},e.concat=function*(...e){for(const t of e)yield*t},e.reduce=function(e,t,n){let i=n;for(const n of e)i=t(i,n);return i},e.slice=function*(e,t,n=e.length){for(t<0&&(t+=e.length),n<0?n+=e.length:n>e.length&&(n=e.length);t<n;t++)yield e[t]},e.consume=function(t,n=Number.POSITIVE_INFINITY){const i=[];if(0===n)return[i,t];const r=t[Symbol.iterator]();for(let t=0;t<n;t++){const t=r.next();if(t.done)return[i,e.empty()];i.push(t.value)}return[i,{[Symbol.iterator]:()=>r}]},e.asyncToArray=async function(e){const t=[];for await(const n of e)t.push(n);return Promise.resolve(t)}}(i||(i={}))},3946:(e,t,n)=>{"use strict";n.d(t,{d:()=>i});class i{constructor(e){this.executor=e,this._didRun=!1}get value(){if(!this._didRun)try{this._value=this.executor()}catch(e){this._error=e}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}}},9235:(e,t,n)=>{"use strict";function i(e,t){const n=this;let i,r=!1;return function(){if(r)return i;if(r=!0,t)try{i=e.apply(n,arguments)}finally{t()}else i=e.apply(n,arguments);return i}}n.d(t,{jG:()=>g,$w:()=>m,Cm:()=>d,HE:()=>f,qE:()=>u,AS:()=>h,VD:()=>a,s:()=>c,Ay:()=>o});var r=n(7954);let s=null;function o(e){return s?.trackDisposable(e),e}function a(e){s?.markAsDisposed(e)}function l(e,t){s?.setParent(e,t)}function h(e){if(r.f.is(e)){const t=[];for(const n of e)if(n)try{n.dispose()}catch(e){t.push(e)}if(1===t.length)throw t[0];if(t.length>1)throw new AggregateError(t,"Encountered errors while disposing of store");return Array.isArray(e)?[]:e}if(e)return e.dispose(),e}function u(...e){const t=c((()=>h(e)));return function(e,t){if(s)for(const n of e)s.setParent(n,t)}(e,t),t}function c(e){const t=o({dispose:i((()=>{a(t),e()}))});return t}class d{static{this.DISABLE_DISPOSED_WARNING=!1}constructor(){this._toDispose=new Set,this._isDisposed=!1,o(this)}dispose(){this._isDisposed||(a(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(0!==this._toDispose.size)try{h(this._toDispose)}finally{this._toDispose.clear()}}add(e){if(!e)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return l(e,this),this._isDisposed?d.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(e),e}deleteAndLeak(e){e&&this._toDispose.has(e)&&(this._toDispose.delete(e),l(e,null))}}class g{static{this.None=Object.freeze({dispose(){}})}constructor(){this._store=new d,o(this),l(this._store,this)}dispose(){a(this),this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}}class f{constructor(){this._isDisposed=!1,o(this)}get value(){return this._isDisposed?void 0:this._value}set value(e){this._isDisposed||e===this._value||(this._value?.dispose(),e&&l(e,this),this._value=e)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,a(this),this._value?.dispose(),this._value=void 0}}class m{constructor(){this._store=new Map,this._isDisposed=!1,o(this)}dispose(){a(this),this._isDisposed=!0,this.clearAndDisposeAll()}clearAndDisposeAll(){if(this._store.size)try{h(this._store.values())}finally{this._store.clear()}}get(e){return this._store.get(e)}set(e,t,n=!1){this._isDisposed&&console.warn(new Error("Trying to add a disposable to a DisposableMap that has already been disposed of. The added object will be leaked!").stack),n||this._store.get(e)?.dispose(),this._store.set(e,t)}deleteAndDispose(e){this._store.get(e)?.dispose(),this._store.delete(e)}[Symbol.iterator](){return this._store[Symbol.iterator]()}}},5525:(e,t,n)=>{"use strict";n.d(t,{w:()=>r});class i{static{this.Undefined=new i(void 0)}constructor(e){this.element=e,this.next=i.Undefined,this.prev=i.Undefined}}class r{constructor(){this._first=i.Undefined,this._last=i.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===i.Undefined}clear(){let e=this._first;for(;e!==i.Undefined;){const t=e.next;e.prev=i.Undefined,e.next=i.Undefined,e=t}this._first=i.Undefined,this._last=i.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){const n=new i(e);if(this._first===i.Undefined)this._first=n,this._last=n;else if(t){const e=this._last;this._last=n,n.prev=e,e.next=n}else{const e=this._first;this._first=n,n.next=e,e.prev=n}this._size+=1;let r=!1;return()=>{r||(r=!0,this._remove(n))}}shift(){if(this._first!==i.Undefined){const e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==i.Undefined){const e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==i.Undefined&&e.next!==i.Undefined){const t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===i.Undefined&&e.next===i.Undefined?(this._first=i.Undefined,this._last=i.Undefined):e.next===i.Undefined?(this._last=this._last.prev,this._last.next=i.Undefined):e.prev===i.Undefined&&(this._first=this._first.next,this._first.prev=i.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==i.Undefined;)yield e.element,e=e.next}}},7992:(e,t,n)=>{"use strict";var i,r;n.d(t,{cO:()=>u,db:()=>c,fT:()=>o,qK:()=>h});class s{constructor(e,t){this.uri=e,this.value=t}}class o{static{this.defaultToKey=e=>e.toString()}constructor(e,t){if(this[i]="ResourceMap",e instanceof o)this.map=new Map(e.map),this.toKey=t??o.defaultToKey;else if(function(e){return Array.isArray(e)}(e)){this.map=new Map,this.toKey=t??o.defaultToKey;for(const[t,n]of e)this.set(t,n)}else this.map=new Map,this.toKey=e??o.defaultToKey}set(e,t){return this.map.set(this.toKey(e),new s(e,t)),this}get(e){return this.map.get(this.toKey(e))?.value}has(e){return this.map.has(this.toKey(e))}get size(){return this.map.size}clear(){this.map.clear()}delete(e){return this.map.delete(this.toKey(e))}forEach(e,t){void 0!==t&&(e=e.bind(t));for(const[t,n]of this.map)e(n.value,n.uri,this)}*values(){for(const e of this.map.values())yield e.value}*keys(){for(const e of this.map.values())yield e.uri}*entries(){for(const e of this.map.values())yield[e.uri,e.value]}*[(i=Symbol.toStringTag,Symbol.iterator)](){for(const[,e]of this.map)yield[e.uri,e.value]}}class a{constructor(){this[r]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,t=0){const n=this._map.get(e);if(n)return 0!==t&&this.touch(n,t),n.value}set(e,t,n=0){let i=this._map.get(e);if(i)i.value=t,0!==n&&this.touch(i,n);else{switch(i={key:e,value:t,next:void 0,previous:void 0},n){case 0:case 2:default:this.addItemLast(i);break;case 1:this.addItemFirst(i)}this._map.set(e,i),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){const n=this._state;let i=this._head;for(;i;){if(t?e.bind(t)(i.value,i.key,this):e(i.value,i.key,this),this._state!==n)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){const e=this,t=this._state;let n=this._head;const i={[Symbol.iterator]:()=>i,next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){const e={value:n.key,done:!1};return n=n.next,e}return{value:void 0,done:!0}}};return i}values(){const e=this,t=this._state;let n=this._head;const i={[Symbol.iterator]:()=>i,next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){const e={value:n.value,done:!1};return n=n.next,e}return{value:void 0,done:!0}}};return i}entries(){const e=this,t=this._state;let n=this._head;const i={[Symbol.iterator]:()=>i,next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){const e={value:[n.key,n.value],done:!1};return n=n.next,e}return{value:void 0,done:!0}}};return i}[(r=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._head,n=this.size;for(;t&&n>e;)this._map.delete(t.key),t=t.next,n--;this._head=t,this._size=n,t&&(t.previous=void 0),this._state++}trimNew(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._tail,n=this.size;for(;t&&n>e;)this._map.delete(t.key),t=t.previous,n--;this._tail=t,this._size=n,t&&(t.next=void 0),this._state++}addItemFirst(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e,this._state++}addItemLast(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const t=e.next,n=e.previous;if(!t||!n)throw new Error("Invalid list");t.previous=n,n.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(1===t||2===t)if(1===t){if(e===this._head)return;const t=e.next,n=e.previous;e===this._tail?(n.next=void 0,this._tail=n):(t.previous=n,n.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(2===t){if(e===this._tail)return;const t=e.next,n=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=n,n.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}toJSON(){const e=[];return this.forEach(((t,n)=>{e.push([n,t])})),e}fromJSON(e){this.clear();for(const[t,n]of e)this.set(t,n)}}class l extends a{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get(e,t=2){return super.get(e,t)}peek(e){return super.get(e,0)}set(e,t){return super.set(e,t,2),this}checkTrim(){this.size>this._limit&&this.trim(Math.round(this._limit*this._ratio))}}class h extends l{constructor(e,t=1){super(e,t)}trim(e){this.trimOld(e)}set(e,t){return super.set(e,t),this.checkTrim(),this}}class u{constructor(e){if(this._m1=new Map,this._m2=new Map,e)for(const[t,n]of e)this.set(t,n)}clear(){this._m1.clear(),this._m2.clear()}set(e,t){this._m1.set(e,t),this._m2.set(t,e)}get(e){return this._m1.get(e)}getKey(e){return this._m2.get(e)}delete(e){const t=this._m1.get(e);return void 0!==t&&(this._m1.delete(e),this._m2.delete(t),!0)}keys(){return this._m1.keys()}values(){return this._m1.values()}}class c{constructor(){this.map=new Map}add(e,t){let n=this.map.get(e);n||(n=new Set,this.map.set(e,n)),n.add(t)}delete(e,t){const n=this.map.get(e);n&&(n.delete(t),0===n.size&&this.map.delete(e))}forEach(e,t){const n=this.map.get(e);n&&n.forEach(t)}get(e){return this.map.get(e)||new Set}}},3720:(e,t,n)=>{"use strict";n.d(t,{K:()=>i});const i=Object.freeze({text:"text/plain",binary:"application/octet-stream",unknown:"application/unknown",markdown:"text/markdown",latex:"text/latex",uriList:"text/uri-list"})},3072:(e,t,n)=>{"use strict";n.d(t,{ny:()=>i,v$:()=>h,zl:()=>d});var i,r=n(4327),s=n(3339),o=n(6844),a=n(7264),l=n(4033);function h(e,t){return a.r.isUri(e)?(0,o.Q_)(e.scheme,t):(0,o.ns)(e,t+":")}!function(e){e.inMemory="inmemory",e.vscode="vscode",e.internal="private",e.walkThrough="walkThrough",e.walkThroughSnippet="walkThroughSnippet",e.http="http",e.https="https",e.file="file",e.mailto="mailto",e.untitled="untitled",e.data="data",e.command="command",e.vscodeRemote="vscode-remote",e.vscodeRemoteResource="vscode-remote-resource",e.vscodeManagedRemoteResource="vscode-managed-remote-resource",e.vscodeUserData="vscode-userdata",e.vscodeCustomEditor="vscode-custom-editor",e.vscodeNotebookCell="vscode-notebook-cell",e.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",e.vscodeNotebookCellMetadataDiff="vscode-notebook-cell-metadata-diff",e.vscodeNotebookCellOutput="vscode-notebook-cell-output",e.vscodeNotebookCellOutputDiff="vscode-notebook-cell-output-diff",e.vscodeNotebookMetadata="vscode-notebook-metadata",e.vscodeInteractiveInput="vscode-interactive-input",e.vscodeSettings="vscode-settings",e.vscodeWorkspaceTrust="vscode-workspace-trust",e.vscodeTerminal="vscode-terminal",e.vscodeChatCodeBlock="vscode-chat-code-block",e.vscodeChatCodeCompareBlock="vscode-chat-code-compare-block",e.vscodeChatSesssion="vscode-chat-editor",e.webviewPanel="webview-panel",e.vscodeWebview="vscode-webview",e.extension="extension",e.vscodeFileResource="vscode-file",e.tmp="tmp",e.vsls="vsls",e.vscodeSourceControl="vscode-scm",e.commentsInput="comment",e.codeSetting="code-setting",e.outputChannel="output"}(i||(i={}));const u=new class{constructor(){this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema="http",this._delegate=null,this._serverRootPath="/"}setPreferredWebSchema(e){this._preferredWebSchema=e}get _remoteResourcesPath(){return l.SA.join(this._serverRootPath,i.vscodeRemoteResource)}rewrite(e){if(this._delegate)try{return this._delegate(e)}catch(t){return r.dz(t),e}const t=e.authority;let n=this._hosts[t];n&&-1!==n.indexOf(":")&&-1===n.indexOf("[")&&(n=`[${n}]`);const o=this._ports[t],l=this._connectionTokens[t];let h=`path=${encodeURIComponent(e.path)}`;return"string"==typeof l&&(h+=`&tkn=${encodeURIComponent(l)}`),a.r.from({scheme:s.HZ?this._preferredWebSchema:i.vscodeRemoteResource,authority:`${n}:${o}`,path:this._remoteResourcesPath,query:h})}};class c{static{this.FALLBACK_AUTHORITY="vscode-app"}asBrowserUri(e){const t=this.toUri(e);return this.uriToBrowserUri(t)}uriToBrowserUri(e){return e.scheme===i.vscodeRemote?u.rewrite(e):e.scheme!==i.file||!s.ib&&s.lg!==`${i.vscodeFileResource}://${c.FALLBACK_AUTHORITY}`?e:e.with({scheme:i.vscodeFileResource,authority:e.authority||c.FALLBACK_AUTHORITY,query:null,fragment:null})}toUri(e,t){if(a.r.isUri(e))return e;if(globalThis._VSCODE_FILE_ROOT){const t=globalThis._VSCODE_FILE_ROOT;if(/^\w[\w\d+.-]*:\/\//.test(t))return a.r.joinPath(a.r.parse(t,!0),e);const n=l.fj(t,e);return a.r.file(n)}return a.r.parse(t.toUrl(e))}}const d=new c;var g;!function(e){const t=new Map([["1",{"Cross-Origin-Opener-Policy":"same-origin"}],["2",{"Cross-Origin-Embedder-Policy":"require-corp"}],["3",{"Cross-Origin-Opener-Policy":"same-origin","Cross-Origin-Embedder-Policy":"require-corp"}]]);e.CoopAndCoep=Object.freeze(t.get("3"));const n="vscode-coi";e.getHeadersFromQuery=function(e){let i;"string"==typeof e?i=new URL(e).searchParams:e instanceof URL?i=e.searchParams:a.r.isUri(e)&&(i=new URL(e.toString(!0)).searchParams);const r=i?.get(n);if(r)return t.get(r)},e.addSearchParam=function(e,t,i){if(!globalThis.crossOriginIsolated)return;const r=t&&i?"3":i?"2":"1";e instanceof URLSearchParams?e.set(n,r):e[n]=r}}(g||(g={}))},1386:(e,t,n)=>{"use strict";function i(e,t){if(e===t)return!0;if(null==e||null==t)return!1;if(typeof e!=typeof t)return!1;if("object"!=typeof e)return!1;if(Array.isArray(e)!==Array.isArray(t))return!1;let n,r;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(n=0;n<e.length;n++)if(!i(e[n],t[n]))return!1}else{const s=[];for(r in e)s.push(r);s.sort();const o=[];for(r in t)o.push(r);if(o.sort(),!i(s,o))return!1;for(n=0;n<s.length;n++)if(!i(e[s[n]],t[s[n]]))return!1}return!0}function r(e){const t=[];for(const n of function(e){let t=[];for(;Object.prototype!==e;)t=t.concat(Object.getOwnPropertyNames(e)),e=Object.getPrototypeOf(e);return t}(e))"function"==typeof e[n]&&t.push(n);return t}function s(e,t){const n=e=>function(){const n=Array.prototype.slice.call(arguments,0);return t(e,n)},i={};for(const t of e)i[t]=n(t);return i}n.d(t,{V0:()=>r,aI:()=>i,kT:()=>s}),Object.prototype.hasOwnProperty},4033:(e,t,n)=>{"use strict";n.d(t,{P8:()=>I,pD:()=>N,LC:()=>T,fj:()=>S,S8:()=>y,SA:()=>w,V8:()=>E,hd:()=>x,Vn:()=>A,IN:()=>v});var i=n(3339);let r;const s=globalThis.vscode;if(void 0!==s&&void 0!==s.process){const e=s.process;r={get platform(){return e.platform},get arch(){return e.arch},get env(){return e.env},cwd:()=>e.cwd()}}else r="undefined"!=typeof process&&"string"==typeof process?.versions?.node?{get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd:()=>process.env.VSCODE_CWD||process.cwd()}:{get platform(){return i.uF?"win32":i.zx?"darwin":"linux"},get arch(){},get env(){return{}},cwd:()=>"/"};const o=r.cwd,a=r.env,l=r.platform,h=46,u=47,c=92,d=58;class g extends Error{constructor(e,t,n){let i;"string"==typeof t&&0===t.indexOf("not ")?(i="must not be",t=t.replace(/^not /,"")):i="must be";const r=-1!==e.indexOf(".")?"property":"argument";let s=`The "${e}" ${r} ${i} of type ${t}`;s+=". Received type "+typeof n,super(s),this.code="ERR_INVALID_ARG_TYPE"}}function f(e,t){if("string"!=typeof e)throw new g(t,"string",e)}const m="win32"===l;function p(e){return e===u||e===c}function _(e){return e===u}function b(e){return e>=65&&e<=90||e>=97&&e<=122}function k(e,t,n,i){let r="",s=0,o=-1,a=0,l=0;for(let c=0;c<=e.length;++c){if(c<e.length)l=e.charCodeAt(c);else{if(i(l))break;l=u}if(i(l)){if(o===c-1||1===a);else if(2===a){if(r.length<2||2!==s||r.charCodeAt(r.length-1)!==h||r.charCodeAt(r.length-2)!==h){if(r.length>2){const e=r.lastIndexOf(n);-1===e?(r="",s=0):(r=r.slice(0,e),s=r.length-1-r.lastIndexOf(n)),o=c,a=0;continue}if(0!==r.length){r="",s=0,o=c,a=0;continue}}t&&(r+=r.length>0?`${n}..`:"..",s=2)}else r.length>0?r+=`${n}${e.slice(o+1,c)}`:r=e.slice(o+1,c),s=c-o-1;o=c,a=0}else l===h&&-1!==a?++a:a=-1}return r}function C(e,t){!function(e){if(null===e||"object"!=typeof e)throw new g("pathObject","Object",e)}(t);const n=t.dir||t.root,i=t.base||`${t.name||""}${r=t.ext,r?`${"."===r[0]?"":"."}${r}`:""}`;var r;return n?n===t.root?`${n}${i}`:`${n}${e}${i}`:i}const v={resolve(...e){let t="",n="",i=!1;for(let r=e.length-1;r>=-1;r--){let s;if(r>=0){if(s=e[r],f(s,`paths[${r}]`),0===s.length)continue}else 0===t.length?s=o():(s=a[`=${t}`]||o(),(void 0===s||s.slice(0,2).toLowerCase()!==t.toLowerCase()&&s.charCodeAt(2)===c)&&(s=`${t}\\`));const l=s.length;let h=0,u="",g=!1;const m=s.charCodeAt(0);if(1===l)p(m)&&(h=1,g=!0);else if(p(m))if(g=!0,p(s.charCodeAt(1))){let e=2,t=e;for(;e<l&&!p(s.charCodeAt(e));)e++;if(e<l&&e!==t){const n=s.slice(t,e);for(t=e;e<l&&p(s.charCodeAt(e));)e++;if(e<l&&e!==t){for(t=e;e<l&&!p(s.charCodeAt(e));)e++;e!==l&&e===t||(u=`\\\\${n}\\${s.slice(t,e)}`,h=e)}}}else h=1;else b(m)&&s.charCodeAt(1)===d&&(u=s.slice(0,2),h=2,l>2&&p(s.charCodeAt(2))&&(g=!0,h=3));if(u.length>0)if(t.length>0){if(u.toLowerCase()!==t.toLowerCase())continue}else t=u;if(i){if(t.length>0)break}else if(n=`${s.slice(h)}\\${n}`,i=g,g&&t.length>0)break}return n=k(n,!i,"\\",p),i?`${t}\\${n}`:`${t}${n}`||"."},normalize(e){f(e,"path");const t=e.length;if(0===t)return".";let n,i=0,r=!1;const s=e.charCodeAt(0);if(1===t)return _(s)?"\\":e;if(p(s))if(r=!0,p(e.charCodeAt(1))){let r=2,s=r;for(;r<t&&!p(e.charCodeAt(r));)r++;if(r<t&&r!==s){const o=e.slice(s,r);for(s=r;r<t&&p(e.charCodeAt(r));)r++;if(r<t&&r!==s){for(s=r;r<t&&!p(e.charCodeAt(r));)r++;if(r===t)return`\\\\${o}\\${e.slice(s)}\\`;r!==s&&(n=`\\\\${o}\\${e.slice(s,r)}`,i=r)}}}else i=1;else b(s)&&e.charCodeAt(1)===d&&(n=e.slice(0,2),i=2,t>2&&p(e.charCodeAt(2))&&(r=!0,i=3));let o=i<t?k(e.slice(i),!r,"\\",p):"";return 0!==o.length||r||(o="."),o.length>0&&p(e.charCodeAt(t-1))&&(o+="\\"),void 0===n?r?`\\${o}`:o:r?`${n}\\${o}`:`${n}${o}`},isAbsolute(e){f(e,"path");const t=e.length;if(0===t)return!1;const n=e.charCodeAt(0);return p(n)||t>2&&b(n)&&e.charCodeAt(1)===d&&p(e.charCodeAt(2))},join(...e){if(0===e.length)return".";let t,n;for(let i=0;i<e.length;++i){const r=e[i];f(r,"path"),r.length>0&&(void 0===t?t=n=r:t+=`\\${r}`)}if(void 0===t)return".";let i=!0,r=0;if("string"==typeof n&&p(n.charCodeAt(0))){++r;const e=n.length;e>1&&p(n.charCodeAt(1))&&(++r,e>2&&(p(n.charCodeAt(2))?++r:i=!1))}if(i){for(;r<t.length&&p(t.charCodeAt(r));)r++;r>=2&&(t=`\\${t.slice(r)}`)}return v.normalize(t)},relative(e,t){if(f(e,"from"),f(t,"to"),e===t)return"";const n=v.resolve(e),i=v.resolve(t);if(n===i)return"";if((e=n.toLowerCase())===(t=i.toLowerCase()))return"";let r=0;for(;r<e.length&&e.charCodeAt(r)===c;)r++;let s=e.length;for(;s-1>r&&e.charCodeAt(s-1)===c;)s--;const o=s-r;let a=0;for(;a<t.length&&t.charCodeAt(a)===c;)a++;let l=t.length;for(;l-1>a&&t.charCodeAt(l-1)===c;)l--;const h=l-a,u=o<h?o:h;let d=-1,g=0;for(;g<u;g++){const n=e.charCodeAt(r+g);if(n!==t.charCodeAt(a+g))break;n===c&&(d=g)}if(g!==u){if(-1===d)return i}else{if(h>u){if(t.charCodeAt(a+g)===c)return i.slice(a+g+1);if(2===g)return i.slice(a+g)}o>u&&(e.charCodeAt(r+g)===c?d=g:2===g&&(d=3)),-1===d&&(d=0)}let m="";for(g=r+d+1;g<=s;++g)g!==s&&e.charCodeAt(g)!==c||(m+=0===m.length?"..":"\\..");return a+=d,m.length>0?`${m}${i.slice(a,l)}`:(i.charCodeAt(a)===c&&++a,i.slice(a,l))},toNamespacedPath(e){if("string"!=typeof e||0===e.length)return e;const t=v.resolve(e);if(t.length<=2)return e;if(t.charCodeAt(0)===c){if(t.charCodeAt(1)===c){const e=t.charCodeAt(2);if(63!==e&&e!==h)return`\\\\?\\UNC\\${t.slice(2)}`}}else if(b(t.charCodeAt(0))&&t.charCodeAt(1)===d&&t.charCodeAt(2)===c)return`\\\\?\\${t}`;return e},dirname(e){f(e,"path");const t=e.length;if(0===t)return".";let n=-1,i=0;const r=e.charCodeAt(0);if(1===t)return p(r)?e:".";if(p(r)){if(n=i=1,p(e.charCodeAt(1))){let r=2,s=r;for(;r<t&&!p(e.charCodeAt(r));)r++;if(r<t&&r!==s){for(s=r;r<t&&p(e.charCodeAt(r));)r++;if(r<t&&r!==s){for(s=r;r<t&&!p(e.charCodeAt(r));)r++;if(r===t)return e;r!==s&&(n=i=r+1)}}}}else b(r)&&e.charCodeAt(1)===d&&(n=t>2&&p(e.charCodeAt(2))?3:2,i=n);let s=-1,o=!0;for(let n=t-1;n>=i;--n)if(p(e.charCodeAt(n))){if(!o){s=n;break}}else o=!1;if(-1===s){if(-1===n)return".";s=n}return e.slice(0,s)},basename(e,t){void 0!==t&&f(t,"suffix"),f(e,"path");let n,i=0,r=-1,s=!0;if(e.length>=2&&b(e.charCodeAt(0))&&e.charCodeAt(1)===d&&(i=2),void 0!==t&&t.length>0&&t.length<=e.length){if(t===e)return"";let o=t.length-1,a=-1;for(n=e.length-1;n>=i;--n){const l=e.charCodeAt(n);if(p(l)){if(!s){i=n+1;break}}else-1===a&&(s=!1,a=n+1),o>=0&&(l===t.charCodeAt(o)?-1==--o&&(r=n):(o=-1,r=a))}return i===r?r=a:-1===r&&(r=e.length),e.slice(i,r)}for(n=e.length-1;n>=i;--n)if(p(e.charCodeAt(n))){if(!s){i=n+1;break}}else-1===r&&(s=!1,r=n+1);return-1===r?"":e.slice(i,r)},extname(e){f(e,"path");let t=0,n=-1,i=0,r=-1,s=!0,o=0;e.length>=2&&e.charCodeAt(1)===d&&b(e.charCodeAt(0))&&(t=i=2);for(let a=e.length-1;a>=t;--a){const t=e.charCodeAt(a);if(p(t)){if(!s){i=a+1;break}}else-1===r&&(s=!1,r=a+1),t===h?-1===n?n=a:1!==o&&(o=1):-1!==n&&(o=-1)}return-1===n||-1===r||0===o||1===o&&n===r-1&&n===i+1?"":e.slice(n,r)},format:C.bind(null,"\\"),parse(e){f(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const n=e.length;let i=0,r=e.charCodeAt(0);if(1===n)return p(r)?(t.root=t.dir=e,t):(t.base=t.name=e,t);if(p(r)){if(i=1,p(e.charCodeAt(1))){let t=2,r=t;for(;t<n&&!p(e.charCodeAt(t));)t++;if(t<n&&t!==r){for(r=t;t<n&&p(e.charCodeAt(t));)t++;if(t<n&&t!==r){for(r=t;t<n&&!p(e.charCodeAt(t));)t++;t===n?i=t:t!==r&&(i=t+1)}}}}else if(b(r)&&e.charCodeAt(1)===d){if(n<=2)return t.root=t.dir=e,t;if(i=2,p(e.charCodeAt(2))){if(3===n)return t.root=t.dir=e,t;i=3}}i>0&&(t.root=e.slice(0,i));let s=-1,o=i,a=-1,l=!0,u=e.length-1,c=0;for(;u>=i;--u)if(r=e.charCodeAt(u),p(r)){if(!l){o=u+1;break}}else-1===a&&(l=!1,a=u+1),r===h?-1===s?s=u:1!==c&&(c=1):-1!==s&&(c=-1);return-1!==a&&(-1===s||0===c||1===c&&s===a-1&&s===o+1?t.base=t.name=e.slice(o,a):(t.name=e.slice(o,s),t.base=e.slice(o,a),t.ext=e.slice(s,a))),t.dir=o>0&&o!==i?e.slice(0,o-1):t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},L=(()=>{if(m){const e=/\\/g;return()=>{const t=o().replace(e,"/");return t.slice(t.indexOf("/"))}}return()=>o()})(),w={resolve(...e){let t="",n=!1;for(let i=e.length-1;i>=-1&&!n;i--){const r=i>=0?e[i]:L();f(r,`paths[${i}]`),0!==r.length&&(t=`${r}/${t}`,n=r.charCodeAt(0)===u)}return t=k(t,!n,"/",_),n?`/${t}`:t.length>0?t:"."},normalize(e){if(f(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===u,n=e.charCodeAt(e.length-1)===u;return 0===(e=k(e,!t,"/",_)).length?t?"/":n?"./":".":(n&&(e+="/"),t?`/${e}`:e)},isAbsolute:e=>(f(e,"path"),e.length>0&&e.charCodeAt(0)===u),join(...e){if(0===e.length)return".";let t;for(let n=0;n<e.length;++n){const i=e[n];f(i,"path"),i.length>0&&(void 0===t?t=i:t+=`/${i}`)}return void 0===t?".":w.normalize(t)},relative(e,t){if(f(e,"from"),f(t,"to"),e===t)return"";if((e=w.resolve(e))===(t=w.resolve(t)))return"";const n=e.length,i=n-1,r=t.length-1,s=i<r?i:r;let o=-1,a=0;for(;a<s;a++){const n=e.charCodeAt(1+a);if(n!==t.charCodeAt(1+a))break;n===u&&(o=a)}if(a===s)if(r>s){if(t.charCodeAt(1+a)===u)return t.slice(1+a+1);if(0===a)return t.slice(1+a)}else i>s&&(e.charCodeAt(1+a)===u?o=a:0===a&&(o=0));let l="";for(a=1+o+1;a<=n;++a)a!==n&&e.charCodeAt(a)!==u||(l+=0===l.length?"..":"/..");return`${l}${t.slice(1+o)}`},toNamespacedPath:e=>e,dirname(e){if(f(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===u;let n=-1,i=!0;for(let t=e.length-1;t>=1;--t)if(e.charCodeAt(t)===u){if(!i){n=t;break}}else i=!1;return-1===n?t?"/":".":t&&1===n?"//":e.slice(0,n)},basename(e,t){void 0!==t&&f(t,"ext"),f(e,"path");let n,i=0,r=-1,s=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t===e)return"";let o=t.length-1,a=-1;for(n=e.length-1;n>=0;--n){const l=e.charCodeAt(n);if(l===u){if(!s){i=n+1;break}}else-1===a&&(s=!1,a=n+1),o>=0&&(l===t.charCodeAt(o)?-1==--o&&(r=n):(o=-1,r=a))}return i===r?r=a:-1===r&&(r=e.length),e.slice(i,r)}for(n=e.length-1;n>=0;--n)if(e.charCodeAt(n)===u){if(!s){i=n+1;break}}else-1===r&&(s=!1,r=n+1);return-1===r?"":e.slice(i,r)},extname(e){f(e,"path");let t=-1,n=0,i=-1,r=!0,s=0;for(let o=e.length-1;o>=0;--o){const a=e.charCodeAt(o);if(a!==u)-1===i&&(r=!1,i=o+1),a===h?-1===t?t=o:1!==s&&(s=1):-1!==t&&(s=-1);else if(!r){n=o+1;break}}return-1===t||-1===i||0===s||1===s&&t===i-1&&t===n+1?"":e.slice(t,i)},format:C.bind(null,"/"),parse(e){f(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const n=e.charCodeAt(0)===u;let i;n?(t.root="/",i=1):i=0;let r=-1,s=0,o=-1,a=!0,l=e.length-1,c=0;for(;l>=i;--l){const t=e.charCodeAt(l);if(t!==u)-1===o&&(a=!1,o=l+1),t===h?-1===r?r=l:1!==c&&(c=1):-1!==r&&(c=-1);else if(!a){s=l+1;break}}if(-1!==o){const i=0===s&&n?1:s;-1===r||0===c||1===c&&r===o-1&&r===s+1?t.base=t.name=e.slice(i,o):(t.name=e.slice(i,r),t.base=e.slice(i,o),t.ext=e.slice(r,o))}return s>0?t.dir=e.slice(0,s-1):n&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};w.win32=v.win32=v,w.posix=v.posix=w;const y=m?v.normalize:w.normalize,S=m?v.join:w.join,x=m?v.resolve:w.resolve,E=m?v.relative:w.relative,N=m?v.dirname:w.dirname,I=m?v.basename:w.basename,T=m?v.extname:w.extname,A=m?v.sep:w.sep},3339:(e,t,n)=>{"use strict";n.d(t,{H8:()=>P,HZ:()=>I,OS:()=>D,UP:()=>q,_p:()=>M,cm:()=>F,gm:()=>z,ib:()=>N,j9:()=>E,lg:()=>T,nr:()=>V,uF:()=>S,zx:()=>x});var i=n(9746);const r="en";let s,o,a=!1,l=!1,h=!1,u=!1,c=!1,d=!1,g=!1,f=!1,m=!1,p=!1,_=null,b=null,k=null;const C=globalThis;let v;void 0!==C.vscode&&void 0!==C.vscode.process?v=C.vscode.process:"undefined"!=typeof process&&"string"==typeof process?.versions?.node&&(v=process);const L="string"==typeof v?.versions?.electron,w=L&&"renderer"===v?.type;if("object"==typeof v){a="win32"===v.platform,l="darwin"===v.platform,h="linux"===v.platform,u=h&&!!v.env.SNAP&&!!v.env.SNAP_REVISION,g=L,m=!!v.env.CI||!!v.env.BUILD_ARTIFACTSTAGINGDIRECTORY,s=r,_=r;const e=v.env.VSCODE_NLS_CONFIG;if(e)try{const t=JSON.parse(e);s=t.userLocale,b=t.osLocale,_=t.resolvedLanguage||r,k=t.languagePack?.translationsConfigFile}catch(e){}c=!0}else"object"!=typeof navigator||w?console.error("Unable to resolve platform."):(o=navigator.userAgent,a=o.indexOf("Windows")>=0,l=o.indexOf("Macintosh")>=0,f=(o.indexOf("Macintosh")>=0||o.indexOf("iPad")>=0||o.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,h=o.indexOf("Linux")>=0,o?.indexOf("Mobi")>=0,d=!0,_=i.i8()||r,s=navigator.language.toLowerCase(),b=s);let y=0;l?y=1:a?y=3:h&&(y=2);const S=a,x=l,E=h,N=c,I=d,T=d&&"function"==typeof C.importScripts?C.origin:void 0,A=o,R="function"==typeof C.postMessage&&!C.importScripts,M=(()=>{if(R){const e=[];C.addEventListener("message",(t=>{if(t.data&&t.data.vscodeScheduleAsyncWork)for(let n=0,i=e.length;n<i;n++){const i=e[n];if(i.id===t.data.vscodeScheduleAsyncWork)return e.splice(n,1),void i.callback()}}));let t=0;return n=>{const i=++t;e.push({id:i,callback:n}),C.postMessage({vscodeScheduleAsyncWork:i},"*")}}return e=>setTimeout(e)})(),D=l||f?2:a?1:3;let O=!0,B=!1;function F(){if(!B){B=!0;const e=new Uint8Array(2);e[0]=1,e[1]=2;const t=new Uint16Array(e.buffer);O=513===t[0]}return O}const P=!!(A&&A.indexOf("Chrome")>=0),z=!!(A&&A.indexOf("Firefox")>=0),V=!!(!P&&A&&A.indexOf("Safari")>=0),q=!!(A&&A.indexOf("Edg/")>=0);A&&A.indexOf("Android")},2467:(e,t,n)=>{"use strict";n.d(t,{B6:()=>m,P8:()=>d});var i=n(8518),r=n(3072),s=n(4033),o=n(3339),a=n(6844),l=n(7264);function h(e){return(0,l.I)(e,!0)}class u{constructor(e){this._ignorePathCasing=e}compare(e,t,n=!1){return e===t?0:(0,a.UD)(this.getComparisonKey(e,n),this.getComparisonKey(t,n))}isEqual(e,t,n=!1){return e===t||!(!e||!t)&&this.getComparisonKey(e,n)===this.getComparisonKey(t,n)}getComparisonKey(e,t=!1){return e.with({path:this._ignorePathCasing(e)?e.path.toLowerCase():void 0,fragment:t?null:void 0}).toString()}isEqualOrParent(e,t,n=!1){if(e.scheme===t.scheme){if(e.scheme===r.ny.file)return i._1(h(e),h(t),this._ignorePathCasing(e))&&e.query===t.query&&(n||e.fragment===t.fragment);if(g(e.authority,t.authority))return i._1(e.path,t.path,this._ignorePathCasing(e),"/")&&e.query===t.query&&(n||e.fragment===t.fragment)}return!1}joinPath(e,...t){return l.r.joinPath(e,...t)}basenameOrAuthority(e){return d(e)||e.authority}basename(e){return s.SA.basename(e.path)}extname(e){return s.SA.extname(e.path)}dirname(e){if(0===e.path.length)return e;let t;return e.scheme===r.ny.file?t=l.r.file(s.pD(h(e))).path:(t=s.SA.dirname(e.path),e.authority&&t.length&&47!==t.charCodeAt(0)&&(console.error(`dirname("${e.toString})) resulted in a relative path`),t="/")),e.with({path:t})}normalizePath(e){if(!e.path.length)return e;let t;return t=e.scheme===r.ny.file?l.r.file(s.S8(h(e))).path:s.SA.normalize(e.path),e.with({path:t})}relativePath(e,t){if(e.scheme!==t.scheme||!g(e.authority,t.authority))return;if(e.scheme===r.ny.file){const n=s.V8(h(e),h(t));return o.uF?i.TH(n):n}let n=e.path||"/";const a=t.path||"/";if(this._ignorePathCasing(e)){let e=0;for(const t=Math.min(n.length,a.length);e<t&&(n.charCodeAt(e)===a.charCodeAt(e)||n.charAt(e).toLowerCase()===a.charAt(e).toLowerCase());e++);n=a.substr(0,e)+n.substr(e)}return s.SA.relative(n,a)}resolvePath(e,t){if(e.scheme===r.ny.file){const n=l.r.file(s.hd(h(e),t));return e.with({authority:n.authority,path:n.path})}return t=i.kb(t),e.with({path:s.SA.resolve(e.path,t)})}isAbsolutePath(e){return!!e.path&&"/"===e.path[0]}isEqualAuthority(e,t){return e===t||void 0!==e&&void 0!==t&&(0,a.Q_)(e,t)}hasTrailingPathSeparator(e,t=s.Vn){if(e.scheme===r.ny.file){const n=h(e);return n.length>i.Zn(n).length&&n[n.length-1]===t}{const t=e.path;return t.length>1&&47===t.charCodeAt(t.length-1)&&!/^[a-zA-Z]:(\/$|\\$)/.test(e.fsPath)}}removeTrailingPathSeparator(e,t=s.Vn){return f(e,t)?e.with({path:e.path.substr(0,e.path.length-1)}):e}addTrailingPathSeparator(e,t=s.Vn){let n=!1;if(e.scheme===r.ny.file){const r=h(e);n=void 0!==r&&r.length===i.Zn(r).length&&r[r.length-1]===t}else{t="/";const i=e.path;n=1===i.length&&47===i.charCodeAt(i.length-1)}return n||f(e,t)?e:e.with({path:e.path+"/"})}}const c=new u((()=>!1)),d=(new u((e=>e.scheme!==r.ny.file||!o.j9)),new u((e=>!0)),c.isEqual.bind(c),c.isEqualOrParent.bind(c),c.getComparisonKey.bind(c),c.basenameOrAuthority.bind(c),c.basename.bind(c)),g=(c.extname.bind(c),c.dirname.bind(c),c.joinPath.bind(c),c.normalizePath.bind(c),c.relativePath.bind(c),c.resolvePath.bind(c),c.isAbsolutePath.bind(c),c.isEqualAuthority.bind(c)),f=c.hasTrailingPathSeparator.bind(c);var m;c.removeTrailingPathSeparator.bind(c),c.addTrailingPathSeparator.bind(c),function(e){e.META_DATA_LABEL="label",e.META_DATA_DESCRIPTION="description",e.META_DATA_SIZE="size",e.META_DATA_MIME="mime",e.parseMetaData=function(t){const n=new Map;t.path.substring(t.path.indexOf(";")+1,t.path.lastIndexOf(";")).split(";").forEach((e=>{const[t,i]=e.split(":");t&&i&&n.set(t,i)}));const i=t.path.substring(0,t.path.indexOf(";"));return i&&n.set(e.META_DATA_MIME,i),n}}(m||(m={}))},3013:(e,t,n)=>{"use strict";n.d(t,{W:()=>r});const i=globalThis.performance&&"function"==typeof globalThis.performance.now;class r{static create(e){return new r(e)}constructor(e){this._now=i&&!1===e?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return-1!==this._stopTime?this._stopTime-this._startTime:this._now()-this._startTime}}},6844:(e,t,n)=>{"use strict";n.d(t,{$X:()=>R,AV:()=>s,E_:()=>N,HG:()=>d,LJ:()=>L,LU:()=>B,NB:()=>l,OS:()=>h,Q_:()=>k,Ss:()=>D,UD:()=>f,Wv:()=>b,Z5:()=>y,_J:()=>A,aC:()=>T,bm:()=>a,eY:()=>u,jy:()=>o,km:()=>x,lT:()=>g,ne:()=>M,ns:()=>C,pc:()=>v,r_:()=>O,tk:()=>F,tl:()=>V,uz:()=>c,y_:()=>q,z_:()=>w});var i=n(6260),r=n(3946);function s(e){return!e||"string"!=typeof e||0===e.trim().length}function o(e){return e.replace(/[<>"'&]/g,(e=>{switch(e){case"<":return"&lt;";case">":return"&gt;";case'"':return"&quot;";case"'":return"&apos;";case"&":return"&amp;"}return e}))}function a(e){return e.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function l(e,t){if(!e||!t)return e;const n=t.length;if(0===n||0===e.length)return e;let i=0;for(;e.indexOf(t,i)===i;)i+=n;return e.substring(i)}function h(e,t,n={}){if(!e)throw new Error("Cannot create regex from empty string");t||(e=a(e)),n.wholeWord&&(/\B/.test(e.charAt(0))||(e="\\b"+e),/\B/.test(e.charAt(e.length-1))||(e+="\\b"));let i="";return n.global&&(i+="g"),n.matchCase||(i+="i"),n.multiline&&(i+="m"),n.unicode&&(i+="u"),new RegExp(e,i)}function u(e){return"^"!==e.source&&"^$"!==e.source&&"$"!==e.source&&"^\\s*$"!==e.source&&!(!e.exec("")||0!==e.lastIndex)}function c(e){return e.split(/\r\n|\r|\n/)}function d(e){for(let t=0,n=e.length;t<n;t++){const n=e.charCodeAt(t);if(32!==n&&9!==n)return t}return-1}function g(e,t=e.length-1){for(let n=t;n>=0;n--){const t=e.charCodeAt(n);if(32!==t&&9!==t)return n}return-1}function f(e,t){return e<t?-1:e>t?1:0}function m(e,t,n=0,i=e.length,r=0,s=t.length){for(;n<i&&r<s;n++,r++){const i=e.charCodeAt(n),s=t.charCodeAt(r);if(i<s)return-1;if(i>s)return 1}const o=i-n,a=s-r;return o<a?-1:o>a?1:0}function p(e,t,n=0,i=e.length,r=0,s=t.length){for(;n<i&&r<s;n++,r++){let o=e.charCodeAt(n),a=t.charCodeAt(r);if(o===a)continue;if(o>=128||a>=128)return m(e.toLowerCase(),t.toLowerCase(),n,i,r,s);_(o)&&(o-=32),_(a)&&(a-=32);const l=o-a;if(0!==l)return l}const o=i-n,a=s-r;return o<a?-1:o>a?1:0}function _(e){return e>=97&&e<=122}function b(e){return e>=65&&e<=90}function k(e,t){return e.length===t.length&&0===p(e,t)}function C(e,t){const n=t.length;return!(t.length>e.length)&&0===p(e,t,0,n)}function v(e){return 55296<=e&&e<=56319}function L(e){return 56320<=e&&e<=57343}function w(e,t){return t-56320+(e-55296<<10)+65536}function y(e,t,n){const i=e.charCodeAt(n);if(v(i)&&n+1<t){const t=e.charCodeAt(n+1);if(L(t))return w(i,t)}return i}class S{get offset(){return this._offset}constructor(e,t=0){this._str=e,this._len=e.length,this._offset=t}setOffset(e){this._offset=e}prevCodePoint(){const e=function(e,t){const n=e.charCodeAt(t-1);if(L(n)&&t>1){const i=e.charCodeAt(t-2);if(v(i))return w(i,n)}return n}(this._str,this._offset);return this._offset-=e>=65536?2:1,e}nextCodePoint(){const e=y(this._str,this._len,this._offset);return this._offset+=e>=65536?2:1,e}eol(){return this._offset>=this._len}}class x{get offset(){return this._iterator.offset}constructor(e,t=0){this._iterator=new S(e,t)}nextGraphemeLength(){const e=z.getInstance(),t=this._iterator,n=t.offset;let i=e.getGraphemeBreakType(t.nextCodePoint());for(;!t.eol();){const n=t.offset,r=e.getGraphemeBreakType(t.nextCodePoint());if(P(i,r)){t.setOffset(n);break}i=r}return t.offset-n}prevGraphemeLength(){const e=z.getInstance(),t=this._iterator,n=t.offset;let i=e.getGraphemeBreakType(t.prevCodePoint());for(;t.offset>0;){const n=t.offset,r=e.getGraphemeBreakType(t.prevCodePoint());if(P(r,i)){t.setOffset(n);break}i=r}return n-t.offset}eol(){return this._iterator.eol()}}let E;function N(e){return E||(E=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA\u07FE-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u088E\u08A0-\u08C9\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDC7\uFDF0-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE35\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDD23\uDE80-\uDEA9\uDEAD-\uDF45\uDF51-\uDF81\uDF86-\uDFF6]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD4B-\uDFFF]|\uD83B[\uDC00-\uDEBB])/),E.test(e)}const I=/^[\t\n\r\x20-\x7E]*$/;function T(e){return I.test(e)}const A=/[\u2028\u2029]/;function R(e){return A.test(e)}function M(e){return e>=11904&&e<=55215||e>=63744&&e<=64255||e>=65281&&e<=65374}function D(e){return e>=127462&&e<=127487||8986===e||8987===e||9200===e||9203===e||e>=9728&&e<=10175||11088===e||11093===e||e>=127744&&e<=128591||e>=128640&&e<=128764||e>=128992&&e<=129008||e>=129280&&e<=129535||e>=129648&&e<=129782}const O=String.fromCharCode(65279);function B(e){return!!(e&&e.length>0&&65279===e.charCodeAt(0))}function F(e){return(e%=52)<26?String.fromCharCode(97+e):String.fromCharCode(65+e-26)}function P(e,t){return 0===e?5!==t&&7!==t:!(2===e&&3===t||4!==e&&2!==e&&3!==e&&4!==t&&2!==t&&3!==t&&(8===e&&(8===t||9===t||11===t||12===t)||!(11!==e&&9!==e||9!==t&&10!==t)||(12===e||10===e)&&10===t||5===t||13===t||7===t||1===e||13===e&&14===t||6===e&&6===t))}class z{static{this._INSTANCE=null}static getInstance(){return z._INSTANCE||(z._INSTANCE=new z),z._INSTANCE}constructor(){this._data=JSON.parse("[0,0,0,51229,51255,12,44061,44087,12,127462,127487,6,7083,7085,5,47645,47671,12,54813,54839,12,128678,128678,14,3270,3270,5,9919,9923,14,45853,45879,12,49437,49463,12,53021,53047,12,71216,71218,7,128398,128399,14,129360,129374,14,2519,2519,5,4448,4519,9,9742,9742,14,12336,12336,14,44957,44983,12,46749,46775,12,48541,48567,12,50333,50359,12,52125,52151,12,53917,53943,12,69888,69890,5,73018,73018,5,127990,127990,14,128558,128559,14,128759,128760,14,129653,129655,14,2027,2035,5,2891,2892,7,3761,3761,5,6683,6683,5,8293,8293,4,9825,9826,14,9999,9999,14,43452,43453,5,44509,44535,12,45405,45431,12,46301,46327,12,47197,47223,12,48093,48119,12,48989,49015,12,49885,49911,12,50781,50807,12,51677,51703,12,52573,52599,12,53469,53495,12,54365,54391,12,65279,65279,4,70471,70472,7,72145,72147,7,119173,119179,5,127799,127818,14,128240,128244,14,128512,128512,14,128652,128652,14,128721,128722,14,129292,129292,14,129445,129450,14,129734,129743,14,1476,1477,5,2366,2368,7,2750,2752,7,3076,3076,5,3415,3415,5,4141,4144,5,6109,6109,5,6964,6964,5,7394,7400,5,9197,9198,14,9770,9770,14,9877,9877,14,9968,9969,14,10084,10084,14,43052,43052,5,43713,43713,5,44285,44311,12,44733,44759,12,45181,45207,12,45629,45655,12,46077,46103,12,46525,46551,12,46973,46999,12,47421,47447,12,47869,47895,12,48317,48343,12,48765,48791,12,49213,49239,12,49661,49687,12,50109,50135,12,50557,50583,12,51005,51031,12,51453,51479,12,51901,51927,12,52349,52375,12,52797,52823,12,53245,53271,12,53693,53719,12,54141,54167,12,54589,54615,12,55037,55063,12,69506,69509,5,70191,70193,5,70841,70841,7,71463,71467,5,72330,72342,5,94031,94031,5,123628,123631,5,127763,127765,14,127941,127941,14,128043,128062,14,128302,128317,14,128465,128467,14,128539,128539,14,128640,128640,14,128662,128662,14,128703,128703,14,128745,128745,14,129004,129007,14,129329,129330,14,129402,129402,14,129483,129483,14,129686,129704,14,130048,131069,14,173,173,4,1757,1757,1,2200,2207,5,2434,2435,7,2631,2632,5,2817,2817,5,3008,3008,5,3201,3201,5,3387,3388,5,3542,3542,5,3902,3903,7,4190,4192,5,6002,6003,5,6439,6440,5,6765,6770,7,7019,7027,5,7154,7155,7,8205,8205,13,8505,8505,14,9654,9654,14,9757,9757,14,9792,9792,14,9852,9853,14,9890,9894,14,9937,9937,14,9981,9981,14,10035,10036,14,11035,11036,14,42654,42655,5,43346,43347,7,43587,43587,5,44006,44007,7,44173,44199,12,44397,44423,12,44621,44647,12,44845,44871,12,45069,45095,12,45293,45319,12,45517,45543,12,45741,45767,12,45965,45991,12,46189,46215,12,46413,46439,12,46637,46663,12,46861,46887,12,47085,47111,12,47309,47335,12,47533,47559,12,47757,47783,12,47981,48007,12,48205,48231,12,48429,48455,12,48653,48679,12,48877,48903,12,49101,49127,12,49325,49351,12,49549,49575,12,49773,49799,12,49997,50023,12,50221,50247,12,50445,50471,12,50669,50695,12,50893,50919,12,51117,51143,12,51341,51367,12,51565,51591,12,51789,51815,12,52013,52039,12,52237,52263,12,52461,52487,12,52685,52711,12,52909,52935,12,53133,53159,12,53357,53383,12,53581,53607,12,53805,53831,12,54029,54055,12,54253,54279,12,54477,54503,12,54701,54727,12,54925,54951,12,55149,55175,12,68101,68102,5,69762,69762,7,70067,70069,7,70371,70378,5,70720,70721,7,71087,71087,5,71341,71341,5,71995,71996,5,72249,72249,7,72850,72871,5,73109,73109,5,118576,118598,5,121505,121519,5,127245,127247,14,127568,127569,14,127777,127777,14,127872,127891,14,127956,127967,14,128015,128016,14,128110,128172,14,128259,128259,14,128367,128368,14,128424,128424,14,128488,128488,14,128530,128532,14,128550,128551,14,128566,128566,14,128647,128647,14,128656,128656,14,128667,128673,14,128691,128693,14,128715,128715,14,128728,128732,14,128752,128752,14,128765,128767,14,129096,129103,14,129311,129311,14,129344,129349,14,129394,129394,14,129413,129425,14,129466,129471,14,129511,129535,14,129664,129666,14,129719,129722,14,129760,129767,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2307,2307,7,2382,2383,7,2497,2500,5,2563,2563,7,2677,2677,5,2763,2764,7,2879,2879,5,2914,2915,5,3021,3021,5,3142,3144,5,3263,3263,5,3285,3286,5,3398,3400,7,3530,3530,5,3633,3633,5,3864,3865,5,3974,3975,5,4155,4156,7,4229,4230,5,5909,5909,7,6078,6085,7,6277,6278,5,6451,6456,7,6744,6750,5,6846,6846,5,6972,6972,5,7074,7077,5,7146,7148,7,7222,7223,5,7416,7417,5,8234,8238,4,8417,8417,5,9000,9000,14,9203,9203,14,9730,9731,14,9748,9749,14,9762,9763,14,9776,9783,14,9800,9811,14,9831,9831,14,9872,9873,14,9882,9882,14,9900,9903,14,9929,9933,14,9941,9960,14,9974,9974,14,9989,9989,14,10006,10006,14,10062,10062,14,10160,10160,14,11647,11647,5,12953,12953,14,43019,43019,5,43232,43249,5,43443,43443,5,43567,43568,7,43696,43696,5,43765,43765,7,44013,44013,5,44117,44143,12,44229,44255,12,44341,44367,12,44453,44479,12,44565,44591,12,44677,44703,12,44789,44815,12,44901,44927,12,45013,45039,12,45125,45151,12,45237,45263,12,45349,45375,12,45461,45487,12,45573,45599,12,45685,45711,12,45797,45823,12,45909,45935,12,46021,46047,12,46133,46159,12,46245,46271,12,46357,46383,12,46469,46495,12,46581,46607,12,46693,46719,12,46805,46831,12,46917,46943,12,47029,47055,12,47141,47167,12,47253,47279,12,47365,47391,12,47477,47503,12,47589,47615,12,47701,47727,12,47813,47839,12,47925,47951,12,48037,48063,12,48149,48175,12,48261,48287,12,48373,48399,12,48485,48511,12,48597,48623,12,48709,48735,12,48821,48847,12,48933,48959,12,49045,49071,12,49157,49183,12,49269,49295,12,49381,49407,12,49493,49519,12,49605,49631,12,49717,49743,12,49829,49855,12,49941,49967,12,50053,50079,12,50165,50191,12,50277,50303,12,50389,50415,12,50501,50527,12,50613,50639,12,50725,50751,12,50837,50863,12,50949,50975,12,51061,51087,12,51173,51199,12,51285,51311,12,51397,51423,12,51509,51535,12,51621,51647,12,51733,51759,12,51845,51871,12,51957,51983,12,52069,52095,12,52181,52207,12,52293,52319,12,52405,52431,12,52517,52543,12,52629,52655,12,52741,52767,12,52853,52879,12,52965,52991,12,53077,53103,12,53189,53215,12,53301,53327,12,53413,53439,12,53525,53551,12,53637,53663,12,53749,53775,12,53861,53887,12,53973,53999,12,54085,54111,12,54197,54223,12,54309,54335,12,54421,54447,12,54533,54559,12,54645,54671,12,54757,54783,12,54869,54895,12,54981,55007,12,55093,55119,12,55243,55291,10,66045,66045,5,68325,68326,5,69688,69702,5,69817,69818,5,69957,69958,7,70089,70092,5,70198,70199,5,70462,70462,5,70502,70508,5,70750,70750,5,70846,70846,7,71100,71101,5,71230,71230,7,71351,71351,5,71737,71738,5,72000,72000,7,72160,72160,5,72273,72278,5,72752,72758,5,72882,72883,5,73031,73031,5,73461,73462,7,94192,94193,7,119149,119149,7,121403,121452,5,122915,122916,5,126980,126980,14,127358,127359,14,127535,127535,14,127759,127759,14,127771,127771,14,127792,127793,14,127825,127867,14,127897,127899,14,127945,127945,14,127985,127986,14,128000,128007,14,128021,128021,14,128066,128100,14,128184,128235,14,128249,128252,14,128266,128276,14,128335,128335,14,128379,128390,14,128407,128419,14,128444,128444,14,128481,128481,14,128499,128499,14,128526,128526,14,128536,128536,14,128543,128543,14,128556,128556,14,128564,128564,14,128577,128580,14,128643,128645,14,128649,128649,14,128654,128654,14,128660,128660,14,128664,128664,14,128675,128675,14,128686,128689,14,128695,128696,14,128705,128709,14,128717,128719,14,128725,128725,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129009,129023,14,129160,129167,14,129296,129304,14,129320,129327,14,129340,129342,14,129356,129356,14,129388,129392,14,129399,129400,14,129404,129407,14,129432,129442,14,129454,129455,14,129473,129474,14,129485,129487,14,129648,129651,14,129659,129660,14,129671,129679,14,129709,129711,14,129728,129730,14,129751,129753,14,129776,129782,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2274,2274,1,2363,2363,7,2377,2380,7,2402,2403,5,2494,2494,5,2507,2508,7,2558,2558,5,2622,2624,7,2641,2641,5,2691,2691,7,2759,2760,5,2786,2787,5,2876,2876,5,2881,2884,5,2901,2902,5,3006,3006,5,3014,3016,7,3072,3072,5,3134,3136,5,3157,3158,5,3260,3260,5,3266,3266,5,3274,3275,7,3328,3329,5,3391,3392,7,3405,3405,5,3457,3457,5,3536,3537,7,3551,3551,5,3636,3642,5,3764,3772,5,3895,3895,5,3967,3967,7,3993,4028,5,4146,4151,5,4182,4183,7,4226,4226,5,4253,4253,5,4957,4959,5,5940,5940,7,6070,6070,7,6087,6088,7,6158,6158,4,6432,6434,5,6448,6449,7,6679,6680,5,6742,6742,5,6754,6754,5,6783,6783,5,6912,6915,5,6966,6970,5,6978,6978,5,7042,7042,7,7080,7081,5,7143,7143,7,7150,7150,7,7212,7219,5,7380,7392,5,7412,7412,5,8203,8203,4,8232,8232,4,8265,8265,14,8400,8412,5,8421,8432,5,8617,8618,14,9167,9167,14,9200,9200,14,9410,9410,14,9723,9726,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9774,14,9786,9786,14,9794,9794,14,9823,9823,14,9828,9828,14,9833,9850,14,9855,9855,14,9875,9875,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9935,9935,14,9939,9939,14,9962,9962,14,9972,9972,14,9978,9978,14,9986,9986,14,9997,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10133,10135,14,10548,10549,14,11093,11093,14,12330,12333,5,12441,12442,5,42608,42610,5,43010,43010,5,43045,43046,5,43188,43203,7,43302,43309,5,43392,43394,5,43446,43449,5,43493,43493,5,43571,43572,7,43597,43597,7,43703,43704,5,43756,43757,5,44003,44004,7,44009,44010,7,44033,44059,12,44089,44115,12,44145,44171,12,44201,44227,12,44257,44283,12,44313,44339,12,44369,44395,12,44425,44451,12,44481,44507,12,44537,44563,12,44593,44619,12,44649,44675,12,44705,44731,12,44761,44787,12,44817,44843,12,44873,44899,12,44929,44955,12,44985,45011,12,45041,45067,12,45097,45123,12,45153,45179,12,45209,45235,12,45265,45291,12,45321,45347,12,45377,45403,12,45433,45459,12,45489,45515,12,45545,45571,12,45601,45627,12,45657,45683,12,45713,45739,12,45769,45795,12,45825,45851,12,45881,45907,12,45937,45963,12,45993,46019,12,46049,46075,12,46105,46131,12,46161,46187,12,46217,46243,12,46273,46299,12,46329,46355,12,46385,46411,12,46441,46467,12,46497,46523,12,46553,46579,12,46609,46635,12,46665,46691,12,46721,46747,12,46777,46803,12,46833,46859,12,46889,46915,12,46945,46971,12,47001,47027,12,47057,47083,12,47113,47139,12,47169,47195,12,47225,47251,12,47281,47307,12,47337,47363,12,47393,47419,12,47449,47475,12,47505,47531,12,47561,47587,12,47617,47643,12,47673,47699,12,47729,47755,12,47785,47811,12,47841,47867,12,47897,47923,12,47953,47979,12,48009,48035,12,48065,48091,12,48121,48147,12,48177,48203,12,48233,48259,12,48289,48315,12,48345,48371,12,48401,48427,12,48457,48483,12,48513,48539,12,48569,48595,12,48625,48651,12,48681,48707,12,48737,48763,12,48793,48819,12,48849,48875,12,48905,48931,12,48961,48987,12,49017,49043,12,49073,49099,12,49129,49155,12,49185,49211,12,49241,49267,12,49297,49323,12,49353,49379,12,49409,49435,12,49465,49491,12,49521,49547,12,49577,49603,12,49633,49659,12,49689,49715,12,49745,49771,12,49801,49827,12,49857,49883,12,49913,49939,12,49969,49995,12,50025,50051,12,50081,50107,12,50137,50163,12,50193,50219,12,50249,50275,12,50305,50331,12,50361,50387,12,50417,50443,12,50473,50499,12,50529,50555,12,50585,50611,12,50641,50667,12,50697,50723,12,50753,50779,12,50809,50835,12,50865,50891,12,50921,50947,12,50977,51003,12,51033,51059,12,51089,51115,12,51145,51171,12,51201,51227,12,51257,51283,12,51313,51339,12,51369,51395,12,51425,51451,12,51481,51507,12,51537,51563,12,51593,51619,12,51649,51675,12,51705,51731,12,51761,51787,12,51817,51843,12,51873,51899,12,51929,51955,12,51985,52011,12,52041,52067,12,52097,52123,12,52153,52179,12,52209,52235,12,52265,52291,12,52321,52347,12,52377,52403,12,52433,52459,12,52489,52515,12,52545,52571,12,52601,52627,12,52657,52683,12,52713,52739,12,52769,52795,12,52825,52851,12,52881,52907,12,52937,52963,12,52993,53019,12,53049,53075,12,53105,53131,12,53161,53187,12,53217,53243,12,53273,53299,12,53329,53355,12,53385,53411,12,53441,53467,12,53497,53523,12,53553,53579,12,53609,53635,12,53665,53691,12,53721,53747,12,53777,53803,12,53833,53859,12,53889,53915,12,53945,53971,12,54001,54027,12,54057,54083,12,54113,54139,12,54169,54195,12,54225,54251,12,54281,54307,12,54337,54363,12,54393,54419,12,54449,54475,12,54505,54531,12,54561,54587,12,54617,54643,12,54673,54699,12,54729,54755,12,54785,54811,12,54841,54867,12,54897,54923,12,54953,54979,12,55009,55035,12,55065,55091,12,55121,55147,12,55177,55203,12,65024,65039,5,65520,65528,4,66422,66426,5,68152,68154,5,69291,69292,5,69633,69633,5,69747,69748,5,69811,69814,5,69826,69826,5,69932,69932,7,70016,70017,5,70079,70080,7,70095,70095,5,70196,70196,5,70367,70367,5,70402,70403,7,70464,70464,5,70487,70487,5,70709,70711,7,70725,70725,7,70833,70834,7,70843,70844,7,70849,70849,7,71090,71093,5,71103,71104,5,71227,71228,7,71339,71339,5,71344,71349,5,71458,71461,5,71727,71735,5,71985,71989,7,71998,71998,5,72002,72002,7,72154,72155,5,72193,72202,5,72251,72254,5,72281,72283,5,72344,72345,5,72766,72766,7,72874,72880,5,72885,72886,5,73023,73029,5,73104,73105,5,73111,73111,5,92912,92916,5,94095,94098,5,113824,113827,4,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,125252,125258,5,127183,127183,14,127340,127343,14,127377,127386,14,127491,127503,14,127548,127551,14,127744,127756,14,127761,127761,14,127769,127769,14,127773,127774,14,127780,127788,14,127796,127797,14,127820,127823,14,127869,127869,14,127894,127895,14,127902,127903,14,127943,127943,14,127947,127950,14,127972,127972,14,127988,127988,14,127992,127994,14,128009,128011,14,128019,128019,14,128023,128041,14,128064,128064,14,128102,128107,14,128174,128181,14,128238,128238,14,128246,128247,14,128254,128254,14,128264,128264,14,128278,128299,14,128329,128330,14,128348,128359,14,128371,128377,14,128392,128393,14,128401,128404,14,128421,128421,14,128433,128434,14,128450,128452,14,128476,128478,14,128483,128483,14,128495,128495,14,128506,128506,14,128519,128520,14,128528,128528,14,128534,128534,14,128538,128538,14,128540,128542,14,128544,128549,14,128552,128555,14,128557,128557,14,128560,128563,14,128565,128565,14,128567,128576,14,128581,128591,14,128641,128642,14,128646,128646,14,128648,128648,14,128650,128651,14,128653,128653,14,128655,128655,14,128657,128659,14,128661,128661,14,128663,128663,14,128665,128666,14,128674,128674,14,128676,128677,14,128679,128685,14,128690,128690,14,128694,128694,14,128697,128702,14,128704,128704,14,128710,128714,14,128716,128716,14,128720,128720,14,128723,128724,14,128726,128727,14,128733,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129008,129008,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129661,129663,14,129667,129670,14,129680,129685,14,129705,129708,14,129712,129718,14,129723,129727,14,129731,129733,14,129744,129750,14,129754,129759,14,129768,129775,14,129783,129791,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2192,2193,1,2250,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3132,3132,5,3137,3140,7,3146,3149,5,3170,3171,5,3202,3203,7,3262,3262,7,3264,3265,7,3267,3268,7,3271,3272,7,3276,3277,5,3298,3299,5,3330,3331,7,3390,3390,5,3393,3396,5,3402,3404,7,3406,3406,1,3426,3427,5,3458,3459,7,3535,3535,5,3538,3540,5,3544,3550,7,3570,3571,7,3635,3635,7,3655,3662,5,3763,3763,7,3784,3789,5,3893,3893,5,3897,3897,5,3953,3966,5,3968,3972,5,3981,3991,5,4038,4038,5,4145,4145,7,4153,4154,5,4157,4158,5,4184,4185,5,4209,4212,5,4228,4228,7,4237,4237,5,4352,4447,8,4520,4607,10,5906,5908,5,5938,5939,5,5970,5971,5,6068,6069,5,6071,6077,5,6086,6086,5,6089,6099,5,6155,6157,5,6159,6159,5,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6862,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7679,5,8204,8204,5,8206,8207,4,8233,8233,4,8252,8252,14,8288,8292,4,8294,8303,4,8413,8416,5,8418,8420,5,8482,8482,14,8596,8601,14,8986,8987,14,9096,9096,14,9193,9196,14,9199,9199,14,9201,9202,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9729,14,9732,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9775,9775,14,9784,9785,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9874,14,9876,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9934,14,9936,9936,14,9938,9938,14,9940,9940,14,9961,9961,14,9963,9967,14,9970,9971,14,9973,9973,14,9975,9977,14,9979,9980,14,9982,9985,14,9987,9988,14,9992,9996,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10083,14,10085,10087,14,10145,10145,14,10175,10175,14,11013,11015,14,11088,11088,14,11503,11505,5,11744,11775,5,12334,12335,5,12349,12349,14,12951,12951,14,42607,42607,5,42612,42621,5,42736,42737,5,43014,43014,5,43043,43044,7,43047,43047,7,43136,43137,7,43204,43205,5,43263,43263,5,43335,43345,5,43360,43388,8,43395,43395,7,43444,43445,7,43450,43451,7,43454,43456,7,43561,43566,5,43569,43570,5,43573,43574,5,43596,43596,5,43644,43644,5,43698,43700,5,43710,43711,5,43755,43755,7,43758,43759,7,43766,43766,5,44005,44005,5,44008,44008,5,44012,44012,7,44032,44032,11,44060,44060,11,44088,44088,11,44116,44116,11,44144,44144,11,44172,44172,11,44200,44200,11,44228,44228,11,44256,44256,11,44284,44284,11,44312,44312,11,44340,44340,11,44368,44368,11,44396,44396,11,44424,44424,11,44452,44452,11,44480,44480,11,44508,44508,11,44536,44536,11,44564,44564,11,44592,44592,11,44620,44620,11,44648,44648,11,44676,44676,11,44704,44704,11,44732,44732,11,44760,44760,11,44788,44788,11,44816,44816,11,44844,44844,11,44872,44872,11,44900,44900,11,44928,44928,11,44956,44956,11,44984,44984,11,45012,45012,11,45040,45040,11,45068,45068,11,45096,45096,11,45124,45124,11,45152,45152,11,45180,45180,11,45208,45208,11,45236,45236,11,45264,45264,11,45292,45292,11,45320,45320,11,45348,45348,11,45376,45376,11,45404,45404,11,45432,45432,11,45460,45460,11,45488,45488,11,45516,45516,11,45544,45544,11,45572,45572,11,45600,45600,11,45628,45628,11,45656,45656,11,45684,45684,11,45712,45712,11,45740,45740,11,45768,45768,11,45796,45796,11,45824,45824,11,45852,45852,11,45880,45880,11,45908,45908,11,45936,45936,11,45964,45964,11,45992,45992,11,46020,46020,11,46048,46048,11,46076,46076,11,46104,46104,11,46132,46132,11,46160,46160,11,46188,46188,11,46216,46216,11,46244,46244,11,46272,46272,11,46300,46300,11,46328,46328,11,46356,46356,11,46384,46384,11,46412,46412,11,46440,46440,11,46468,46468,11,46496,46496,11,46524,46524,11,46552,46552,11,46580,46580,11,46608,46608,11,46636,46636,11,46664,46664,11,46692,46692,11,46720,46720,11,46748,46748,11,46776,46776,11,46804,46804,11,46832,46832,11,46860,46860,11,46888,46888,11,46916,46916,11,46944,46944,11,46972,46972,11,47000,47000,11,47028,47028,11,47056,47056,11,47084,47084,11,47112,47112,11,47140,47140,11,47168,47168,11,47196,47196,11,47224,47224,11,47252,47252,11,47280,47280,11,47308,47308,11,47336,47336,11,47364,47364,11,47392,47392,11,47420,47420,11,47448,47448,11,47476,47476,11,47504,47504,11,47532,47532,11,47560,47560,11,47588,47588,11,47616,47616,11,47644,47644,11,47672,47672,11,47700,47700,11,47728,47728,11,47756,47756,11,47784,47784,11,47812,47812,11,47840,47840,11,47868,47868,11,47896,47896,11,47924,47924,11,47952,47952,11,47980,47980,11,48008,48008,11,48036,48036,11,48064,48064,11,48092,48092,11,48120,48120,11,48148,48148,11,48176,48176,11,48204,48204,11,48232,48232,11,48260,48260,11,48288,48288,11,48316,48316,11,48344,48344,11,48372,48372,11,48400,48400,11,48428,48428,11,48456,48456,11,48484,48484,11,48512,48512,11,48540,48540,11,48568,48568,11,48596,48596,11,48624,48624,11,48652,48652,11,48680,48680,11,48708,48708,11,48736,48736,11,48764,48764,11,48792,48792,11,48820,48820,11,48848,48848,11,48876,48876,11,48904,48904,11,48932,48932,11,48960,48960,11,48988,48988,11,49016,49016,11,49044,49044,11,49072,49072,11,49100,49100,11,49128,49128,11,49156,49156,11,49184,49184,11,49212,49212,11,49240,49240,11,49268,49268,11,49296,49296,11,49324,49324,11,49352,49352,11,49380,49380,11,49408,49408,11,49436,49436,11,49464,49464,11,49492,49492,11,49520,49520,11,49548,49548,11,49576,49576,11,49604,49604,11,49632,49632,11,49660,49660,11,49688,49688,11,49716,49716,11,49744,49744,11,49772,49772,11,49800,49800,11,49828,49828,11,49856,49856,11,49884,49884,11,49912,49912,11,49940,49940,11,49968,49968,11,49996,49996,11,50024,50024,11,50052,50052,11,50080,50080,11,50108,50108,11,50136,50136,11,50164,50164,11,50192,50192,11,50220,50220,11,50248,50248,11,50276,50276,11,50304,50304,11,50332,50332,11,50360,50360,11,50388,50388,11,50416,50416,11,50444,50444,11,50472,50472,11,50500,50500,11,50528,50528,11,50556,50556,11,50584,50584,11,50612,50612,11,50640,50640,11,50668,50668,11,50696,50696,11,50724,50724,11,50752,50752,11,50780,50780,11,50808,50808,11,50836,50836,11,50864,50864,11,50892,50892,11,50920,50920,11,50948,50948,11,50976,50976,11,51004,51004,11,51032,51032,11,51060,51060,11,51088,51088,11,51116,51116,11,51144,51144,11,51172,51172,11,51200,51200,11,51228,51228,11,51256,51256,11,51284,51284,11,51312,51312,11,51340,51340,11,51368,51368,11,51396,51396,11,51424,51424,11,51452,51452,11,51480,51480,11,51508,51508,11,51536,51536,11,51564,51564,11,51592,51592,11,51620,51620,11,51648,51648,11,51676,51676,11,51704,51704,11,51732,51732,11,51760,51760,11,51788,51788,11,51816,51816,11,51844,51844,11,51872,51872,11,51900,51900,11,51928,51928,11,51956,51956,11,51984,51984,11,52012,52012,11,52040,52040,11,52068,52068,11,52096,52096,11,52124,52124,11,52152,52152,11,52180,52180,11,52208,52208,11,52236,52236,11,52264,52264,11,52292,52292,11,52320,52320,11,52348,52348,11,52376,52376,11,52404,52404,11,52432,52432,11,52460,52460,11,52488,52488,11,52516,52516,11,52544,52544,11,52572,52572,11,52600,52600,11,52628,52628,11,52656,52656,11,52684,52684,11,52712,52712,11,52740,52740,11,52768,52768,11,52796,52796,11,52824,52824,11,52852,52852,11,52880,52880,11,52908,52908,11,52936,52936,11,52964,52964,11,52992,52992,11,53020,53020,11,53048,53048,11,53076,53076,11,53104,53104,11,53132,53132,11,53160,53160,11,53188,53188,11,53216,53216,11,53244,53244,11,53272,53272,11,53300,53300,11,53328,53328,11,53356,53356,11,53384,53384,11,53412,53412,11,53440,53440,11,53468,53468,11,53496,53496,11,53524,53524,11,53552,53552,11,53580,53580,11,53608,53608,11,53636,53636,11,53664,53664,11,53692,53692,11,53720,53720,11,53748,53748,11,53776,53776,11,53804,53804,11,53832,53832,11,53860,53860,11,53888,53888,11,53916,53916,11,53944,53944,11,53972,53972,11,54000,54000,11,54028,54028,11,54056,54056,11,54084,54084,11,54112,54112,11,54140,54140,11,54168,54168,11,54196,54196,11,54224,54224,11,54252,54252,11,54280,54280,11,54308,54308,11,54336,54336,11,54364,54364,11,54392,54392,11,54420,54420,11,54448,54448,11,54476,54476,11,54504,54504,11,54532,54532,11,54560,54560,11,54588,54588,11,54616,54616,11,54644,54644,11,54672,54672,11,54700,54700,11,54728,54728,11,54756,54756,11,54784,54784,11,54812,54812,11,54840,54840,11,54868,54868,11,54896,54896,11,54924,54924,11,54952,54952,11,54980,54980,11,55008,55008,11,55036,55036,11,55064,55064,11,55092,55092,11,55120,55120,11,55148,55148,11,55176,55176,11,55216,55238,9,64286,64286,5,65056,65071,5,65438,65439,5,65529,65531,4,66272,66272,5,68097,68099,5,68108,68111,5,68159,68159,5,68900,68903,5,69446,69456,5,69632,69632,7,69634,69634,7,69744,69744,5,69759,69761,5,69808,69810,7,69815,69816,7,69821,69821,1,69837,69837,1,69927,69931,5,69933,69940,5,70003,70003,5,70018,70018,7,70070,70078,5,70082,70083,1,70094,70094,7,70188,70190,7,70194,70195,7,70197,70197,7,70206,70206,5,70368,70370,7,70400,70401,5,70459,70460,5,70463,70463,7,70465,70468,7,70475,70477,7,70498,70499,7,70512,70516,5,70712,70719,5,70722,70724,5,70726,70726,5,70832,70832,5,70835,70840,5,70842,70842,5,70845,70845,5,70847,70848,5,70850,70851,5,71088,71089,7,71096,71099,7,71102,71102,7,71132,71133,5,71219,71226,5,71229,71229,5,71231,71232,5,71340,71340,7,71342,71343,7,71350,71350,7,71453,71455,5,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,118528,118573,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123566,123566,5,125136,125142,5,126976,126979,14,126981,127182,14,127184,127231,14,127279,127279,14,127344,127345,14,127374,127374,14,127405,127461,14,127489,127490,14,127514,127514,14,127538,127546,14,127561,127567,14,127570,127743,14,127757,127758,14,127760,127760,14,127762,127762,14,127766,127768,14,127770,127770,14,127772,127772,14,127775,127776,14,127778,127779,14,127789,127791,14,127794,127795,14,127798,127798,14,127819,127819,14,127824,127824,14,127868,127868,14,127870,127871,14,127892,127893,14,127896,127896,14,127900,127901,14,127904,127940,14,127942,127942,14,127944,127944,14,127946,127946,14,127951,127955,14,127968,127971,14,127973,127984,14,127987,127987,14,127989,127989,14,127991,127991,14,127995,127999,5,128008,128008,14,128012,128014,14,128017,128018,14,128020,128020,14,128022,128022,14,128042,128042,14,128063,128063,14,128065,128065,14,128101,128101,14,128108,128109,14,128173,128173,14,128182,128183,14,128236,128237,14,128239,128239,14,128245,128245,14,128248,128248,14,128253,128253,14,128255,128258,14,128260,128263,14,128265,128265,14,128277,128277,14,128300,128301,14,128326,128328,14,128331,128334,14,128336,128347,14,128360,128366,14,128369,128370,14,128378,128378,14,128391,128391,14,128394,128397,14,128400,128400,14,128405,128406,14,128420,128420,14,128422,128423,14,128425,128432,14,128435,128443,14,128445,128449,14,128453,128464,14,128468,128475,14,128479,128480,14,128482,128482,14,128484,128487,14,128489,128494,14,128496,128498,14,128500,128505,14,128507,128511,14,128513,128518,14,128521,128525,14,128527,128527,14,128529,128529,14,128533,128533,14,128535,128535,14,128537,128537,14]")}getGraphemeBreakType(e){if(e<32)return 10===e?3:13===e?2:4;if(e<127)return 0;const t=this._data,n=t.length/3;let i=1;for(;i<=n;)if(e<t[3*i])i*=2;else{if(!(e>t[3*i+1]))return t[3*i+2];i=2*i+1}return 0}}class V{static{this.ambiguousCharacterData=new r.d((()=>JSON.parse('{"_common":[8232,32,8233,32,5760,32,8192,32,8193,32,8194,32,8195,32,8196,32,8197,32,8198,32,8200,32,8201,32,8202,32,8287,32,8199,32,8239,32,2042,95,65101,95,65102,95,65103,95,8208,45,8209,45,8210,45,65112,45,1748,45,8259,45,727,45,8722,45,10134,45,11450,45,1549,44,1643,44,8218,44,184,44,42233,44,894,59,2307,58,2691,58,1417,58,1795,58,1796,58,5868,58,65072,58,6147,58,6153,58,8282,58,1475,58,760,58,42889,58,8758,58,720,58,42237,58,451,33,11601,33,660,63,577,63,2429,63,5038,63,42731,63,119149,46,8228,46,1793,46,1794,46,42510,46,68176,46,1632,46,1776,46,42232,46,1373,96,65287,96,8219,96,8242,96,1370,96,1523,96,8175,96,65344,96,900,96,8189,96,8125,96,8127,96,8190,96,697,96,884,96,712,96,714,96,715,96,756,96,699,96,701,96,700,96,702,96,42892,96,1497,96,2036,96,2037,96,5194,96,5836,96,94033,96,94034,96,65339,91,10088,40,10098,40,12308,40,64830,40,65341,93,10089,41,10099,41,12309,41,64831,41,10100,123,119060,123,10101,125,65342,94,8270,42,1645,42,8727,42,66335,42,5941,47,8257,47,8725,47,8260,47,9585,47,10187,47,10744,47,119354,47,12755,47,12339,47,11462,47,20031,47,12035,47,65340,92,65128,92,8726,92,10189,92,10741,92,10745,92,119311,92,119355,92,12756,92,20022,92,12034,92,42872,38,708,94,710,94,5869,43,10133,43,66203,43,8249,60,10094,60,706,60,119350,60,5176,60,5810,60,5120,61,11840,61,12448,61,42239,61,8250,62,10095,62,707,62,119351,62,5171,62,94015,62,8275,126,732,126,8128,126,8764,126,65372,124,65293,45,120784,50,120794,50,120804,50,120814,50,120824,50,130034,50,42842,50,423,50,1000,50,42564,50,5311,50,42735,50,119302,51,120785,51,120795,51,120805,51,120815,51,120825,51,130035,51,42923,51,540,51,439,51,42858,51,11468,51,1248,51,94011,51,71882,51,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,120789,55,120799,55,120809,55,120819,55,120829,55,130039,55,66770,55,71878,55,2819,56,2538,56,2666,56,125131,56,120790,56,120800,56,120810,56,120820,56,120830,56,130040,56,547,56,546,56,66330,56,2663,57,2920,57,2541,57,3437,57,120791,57,120801,57,120811,57,120821,57,120831,57,130041,57,42862,57,11466,57,71884,57,71852,57,71894,57,9082,97,65345,97,119834,97,119886,97,119938,97,119990,97,120042,97,120094,97,120146,97,120198,97,120250,97,120302,97,120354,97,120406,97,120458,97,593,97,945,97,120514,97,120572,97,120630,97,120688,97,120746,97,65313,65,119808,65,119860,65,119912,65,119964,65,120016,65,120068,65,120120,65,120172,65,120224,65,120276,65,120328,65,120380,65,120432,65,913,65,120488,65,120546,65,120604,65,120662,65,120720,65,5034,65,5573,65,42222,65,94016,65,66208,65,119835,98,119887,98,119939,98,119991,98,120043,98,120095,98,120147,98,120199,98,120251,98,120303,98,120355,98,120407,98,120459,98,388,98,5071,98,5234,98,5551,98,65314,66,8492,66,119809,66,119861,66,119913,66,120017,66,120069,66,120121,66,120173,66,120225,66,120277,66,120329,66,120381,66,120433,66,42932,66,914,66,120489,66,120547,66,120605,66,120663,66,120721,66,5108,66,5623,66,42192,66,66178,66,66209,66,66305,66,65347,99,8573,99,119836,99,119888,99,119940,99,119992,99,120044,99,120096,99,120148,99,120200,99,120252,99,120304,99,120356,99,120408,99,120460,99,7428,99,1010,99,11429,99,43951,99,66621,99,128844,67,71922,67,71913,67,65315,67,8557,67,8450,67,8493,67,119810,67,119862,67,119914,67,119966,67,120018,67,120174,67,120226,67,120278,67,120330,67,120382,67,120434,67,1017,67,11428,67,5087,67,42202,67,66210,67,66306,67,66581,67,66844,67,8574,100,8518,100,119837,100,119889,100,119941,100,119993,100,120045,100,120097,100,120149,100,120201,100,120253,100,120305,100,120357,100,120409,100,120461,100,1281,100,5095,100,5231,100,42194,100,8558,68,8517,68,119811,68,119863,68,119915,68,119967,68,120019,68,120071,68,120123,68,120175,68,120227,68,120279,68,120331,68,120383,68,120435,68,5024,68,5598,68,5610,68,42195,68,8494,101,65349,101,8495,101,8519,101,119838,101,119890,101,119942,101,120046,101,120098,101,120150,101,120202,101,120254,101,120306,101,120358,101,120410,101,120462,101,43826,101,1213,101,8959,69,65317,69,8496,69,119812,69,119864,69,119916,69,120020,69,120072,69,120124,69,120176,69,120228,69,120280,69,120332,69,120384,69,120436,69,917,69,120492,69,120550,69,120608,69,120666,69,120724,69,11577,69,5036,69,42224,69,71846,69,71854,69,66182,69,119839,102,119891,102,119943,102,119995,102,120047,102,120099,102,120151,102,120203,102,120255,102,120307,102,120359,102,120411,102,120463,102,43829,102,42905,102,383,102,7837,102,1412,102,119315,70,8497,70,119813,70,119865,70,119917,70,120021,70,120073,70,120125,70,120177,70,120229,70,120281,70,120333,70,120385,70,120437,70,42904,70,988,70,120778,70,5556,70,42205,70,71874,70,71842,70,66183,70,66213,70,66853,70,65351,103,8458,103,119840,103,119892,103,119944,103,120048,103,120100,103,120152,103,120204,103,120256,103,120308,103,120360,103,120412,103,120464,103,609,103,7555,103,397,103,1409,103,119814,71,119866,71,119918,71,119970,71,120022,71,120074,71,120126,71,120178,71,120230,71,120282,71,120334,71,120386,71,120438,71,1292,71,5056,71,5107,71,42198,71,65352,104,8462,104,119841,104,119945,104,119997,104,120049,104,120101,104,120153,104,120205,104,120257,104,120309,104,120361,104,120413,104,120465,104,1211,104,1392,104,5058,104,65320,72,8459,72,8460,72,8461,72,119815,72,119867,72,119919,72,120023,72,120179,72,120231,72,120283,72,120335,72,120387,72,120439,72,919,72,120494,72,120552,72,120610,72,120668,72,120726,72,11406,72,5051,72,5500,72,42215,72,66255,72,731,105,9075,105,65353,105,8560,105,8505,105,8520,105,119842,105,119894,105,119946,105,119998,105,120050,105,120102,105,120154,105,120206,105,120258,105,120310,105,120362,105,120414,105,120466,105,120484,105,618,105,617,105,953,105,8126,105,890,105,120522,105,120580,105,120638,105,120696,105,120754,105,1110,105,42567,105,1231,105,43893,105,5029,105,71875,105,65354,106,8521,106,119843,106,119895,106,119947,106,119999,106,120051,106,120103,106,120155,106,120207,106,120259,106,120311,106,120363,106,120415,106,120467,106,1011,106,1112,106,65322,74,119817,74,119869,74,119921,74,119973,74,120025,74,120077,74,120129,74,120181,74,120233,74,120285,74,120337,74,120389,74,120441,74,42930,74,895,74,1032,74,5035,74,5261,74,42201,74,119844,107,119896,107,119948,107,120000,107,120052,107,120104,107,120156,107,120208,107,120260,107,120312,107,120364,107,120416,107,120468,107,8490,75,65323,75,119818,75,119870,75,119922,75,119974,75,120026,75,120078,75,120130,75,120182,75,120234,75,120286,75,120338,75,120390,75,120442,75,922,75,120497,75,120555,75,120613,75,120671,75,120729,75,11412,75,5094,75,5845,75,42199,75,66840,75,1472,108,8739,73,9213,73,65512,73,1633,108,1777,73,66336,108,125127,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,119816,73,119868,73,119920,73,120024,73,120128,73,120180,73,120232,73,120284,73,120336,73,120388,73,120440,73,65356,108,8572,73,8467,108,119845,108,119897,108,119949,108,120001,108,120053,108,120105,73,120157,73,120209,73,120261,73,120313,73,120365,73,120417,73,120469,73,448,73,120496,73,120554,73,120612,73,120670,73,120728,73,11410,73,1030,73,1216,73,1493,108,1503,108,1575,108,126464,108,126592,108,65166,108,65165,108,1994,108,11599,73,5825,73,42226,73,93992,73,66186,124,66313,124,119338,76,8556,76,8466,76,119819,76,119871,76,119923,76,120027,76,120079,76,120131,76,120183,76,120235,76,120287,76,120339,76,120391,76,120443,76,11472,76,5086,76,5290,76,42209,76,93974,76,71843,76,71858,76,66587,76,66854,76,65325,77,8559,77,8499,77,119820,77,119872,77,119924,77,120028,77,120080,77,120132,77,120184,77,120236,77,120288,77,120340,77,120392,77,120444,77,924,77,120499,77,120557,77,120615,77,120673,77,120731,77,1018,77,11416,77,5047,77,5616,77,5846,77,42207,77,66224,77,66321,77,119847,110,119899,110,119951,110,120003,110,120055,110,120107,110,120159,110,120211,110,120263,110,120315,110,120367,110,120419,110,120471,110,1400,110,1404,110,65326,78,8469,78,119821,78,119873,78,119925,78,119977,78,120029,78,120081,78,120185,78,120237,78,120289,78,120341,78,120393,78,120445,78,925,78,120500,78,120558,78,120616,78,120674,78,120732,78,11418,78,42208,78,66835,78,3074,111,3202,111,3330,111,3458,111,2406,111,2662,111,2790,111,3046,111,3174,111,3302,111,3430,111,3664,111,3792,111,4160,111,1637,111,1781,111,65359,111,8500,111,119848,111,119900,111,119952,111,120056,111,120108,111,120160,111,120212,111,120264,111,120316,111,120368,111,120420,111,120472,111,7439,111,7441,111,43837,111,959,111,120528,111,120586,111,120644,111,120702,111,120760,111,963,111,120532,111,120590,111,120648,111,120706,111,120764,111,11423,111,4351,111,1413,111,1505,111,1607,111,126500,111,126564,111,126596,111,65259,111,65260,111,65258,111,65257,111,1726,111,64428,111,64429,111,64427,111,64426,111,1729,111,64424,111,64425,111,64423,111,64422,111,1749,111,3360,111,4125,111,66794,111,71880,111,71895,111,66604,111,1984,79,2534,79,2918,79,12295,79,70864,79,71904,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,119822,79,119874,79,119926,79,119978,79,120030,79,120082,79,120134,79,120186,79,120238,79,120290,79,120342,79,120394,79,120446,79,927,79,120502,79,120560,79,120618,79,120676,79,120734,79,11422,79,1365,79,11604,79,4816,79,2848,79,66754,79,42227,79,71861,79,66194,79,66219,79,66564,79,66838,79,9076,112,65360,112,119849,112,119901,112,119953,112,120005,112,120057,112,120109,112,120161,112,120213,112,120265,112,120317,112,120369,112,120421,112,120473,112,961,112,120530,112,120544,112,120588,112,120602,112,120646,112,120660,112,120704,112,120718,112,120762,112,120776,112,11427,112,65328,80,8473,80,119823,80,119875,80,119927,80,119979,80,120031,80,120083,80,120187,80,120239,80,120291,80,120343,80,120395,80,120447,80,929,80,120504,80,120562,80,120620,80,120678,80,120736,80,11426,80,5090,80,5229,80,42193,80,66197,80,119850,113,119902,113,119954,113,120006,113,120058,113,120110,113,120162,113,120214,113,120266,113,120318,113,120370,113,120422,113,120474,113,1307,113,1379,113,1382,113,8474,81,119824,81,119876,81,119928,81,119980,81,120032,81,120084,81,120188,81,120240,81,120292,81,120344,81,120396,81,120448,81,11605,81,119851,114,119903,114,119955,114,120007,114,120059,114,120111,114,120163,114,120215,114,120267,114,120319,114,120371,114,120423,114,120475,114,43847,114,43848,114,7462,114,11397,114,43905,114,119318,82,8475,82,8476,82,8477,82,119825,82,119877,82,119929,82,120033,82,120189,82,120241,82,120293,82,120345,82,120397,82,120449,82,422,82,5025,82,5074,82,66740,82,5511,82,42211,82,94005,82,65363,115,119852,115,119904,115,119956,115,120008,115,120060,115,120112,115,120164,115,120216,115,120268,115,120320,115,120372,115,120424,115,120476,115,42801,115,445,115,1109,115,43946,115,71873,115,66632,115,65331,83,119826,83,119878,83,119930,83,119982,83,120034,83,120086,83,120138,83,120190,83,120242,83,120294,83,120346,83,120398,83,120450,83,1029,83,1359,83,5077,83,5082,83,42210,83,94010,83,66198,83,66592,83,119853,116,119905,116,119957,116,120009,116,120061,116,120113,116,120165,116,120217,116,120269,116,120321,116,120373,116,120425,116,120477,116,8868,84,10201,84,128872,84,65332,84,119827,84,119879,84,119931,84,119983,84,120035,84,120087,84,120139,84,120191,84,120243,84,120295,84,120347,84,120399,84,120451,84,932,84,120507,84,120565,84,120623,84,120681,84,120739,84,11430,84,5026,84,42196,84,93962,84,71868,84,66199,84,66225,84,66325,84,119854,117,119906,117,119958,117,120010,117,120062,117,120114,117,120166,117,120218,117,120270,117,120322,117,120374,117,120426,117,120478,117,42911,117,7452,117,43854,117,43858,117,651,117,965,117,120534,117,120592,117,120650,117,120708,117,120766,117,1405,117,66806,117,71896,117,8746,85,8899,85,119828,85,119880,85,119932,85,119984,85,120036,85,120088,85,120140,85,120192,85,120244,85,120296,85,120348,85,120400,85,120452,85,1357,85,4608,85,66766,85,5196,85,42228,85,94018,85,71864,85,8744,118,8897,118,65366,118,8564,118,119855,118,119907,118,119959,118,120011,118,120063,118,120115,118,120167,118,120219,118,120271,118,120323,118,120375,118,120427,118,120479,118,7456,118,957,118,120526,118,120584,118,120642,118,120700,118,120758,118,1141,118,1496,118,71430,118,43945,118,71872,118,119309,86,1639,86,1783,86,8548,86,119829,86,119881,86,119933,86,119985,86,120037,86,120089,86,120141,86,120193,86,120245,86,120297,86,120349,86,120401,86,120453,86,1140,86,11576,86,5081,86,5167,86,42719,86,42214,86,93960,86,71840,86,66845,86,623,119,119856,119,119908,119,119960,119,120012,119,120064,119,120116,119,120168,119,120220,119,120272,119,120324,119,120376,119,120428,119,120480,119,7457,119,1121,119,1309,119,1377,119,71434,119,71438,119,71439,119,43907,119,71919,87,71910,87,119830,87,119882,87,119934,87,119986,87,120038,87,120090,87,120142,87,120194,87,120246,87,120298,87,120350,87,120402,87,120454,87,1308,87,5043,87,5076,87,42218,87,5742,120,10539,120,10540,120,10799,120,65368,120,8569,120,119857,120,119909,120,119961,120,120013,120,120065,120,120117,120,120169,120,120221,120,120273,120,120325,120,120377,120,120429,120,120481,120,5441,120,5501,120,5741,88,9587,88,66338,88,71916,88,65336,88,8553,88,119831,88,119883,88,119935,88,119987,88,120039,88,120091,88,120143,88,120195,88,120247,88,120299,88,120351,88,120403,88,120455,88,42931,88,935,88,120510,88,120568,88,120626,88,120684,88,120742,88,11436,88,11613,88,5815,88,42219,88,66192,88,66228,88,66327,88,66855,88,611,121,7564,121,65369,121,119858,121,119910,121,119962,121,120014,121,120066,121,120118,121,120170,121,120222,121,120274,121,120326,121,120378,121,120430,121,120482,121,655,121,7935,121,43866,121,947,121,8509,121,120516,121,120574,121,120632,121,120690,121,120748,121,1199,121,4327,121,71900,121,65337,89,119832,89,119884,89,119936,89,119988,89,120040,89,120092,89,120144,89,120196,89,120248,89,120300,89,120352,89,120404,89,120456,89,933,89,978,89,120508,89,120566,89,120624,89,120682,89,120740,89,11432,89,1198,89,5033,89,5053,89,42220,89,94019,89,71844,89,66226,89,119859,122,119911,122,119963,122,120015,122,120067,122,120119,122,120171,122,120223,122,120275,122,120327,122,120379,122,120431,122,120483,122,7458,122,43923,122,71876,122,66293,90,71909,90,65338,90,8484,90,8488,90,119833,90,119885,90,119937,90,119989,90,120041,90,120197,90,120249,90,120301,90,120353,90,120405,90,120457,90,918,90,120493,90,120551,90,120609,90,120667,90,120725,90,5059,90,42204,90,71849,90,65282,34,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65297,49,65298,50,65299,51,65300,52,65301,53,65302,54,65303,55,65304,56,65305,57,65308,60,65309,61,65310,62,65312,64,65316,68,65318,70,65319,71,65324,76,65329,81,65330,82,65333,85,65334,86,65335,87,65343,95,65346,98,65348,100,65350,102,65355,107,65357,109,65358,110,65361,113,65362,114,65364,116,65365,117,65367,119,65370,122,65371,123,65373,125,119846,109],"_default":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"cs":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"de":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"es":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"fr":[65374,126,65306,58,65281,33,8216,96,8245,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"it":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ja":[8211,45,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65292,44,65307,59],"ko":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pl":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pt-BR":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ru":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"tr":[160,32,8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"zh-hans":[65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41],"zh-hant":[8211,45,65374,126,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65307,59]}')))}static{this.cache=new i.o5({getCacheKey:JSON.stringify},(e=>{function t(e){const t=new Map;for(let n=0;n<e.length;n+=2)t.set(e[n],e[n+1]);return t}function n(e,t){if(!e)return t;const n=new Map;for(const[i,r]of e)t.has(i)&&n.set(i,r);return n}const i=this.ambiguousCharacterData.value;let r,s=e.filter((e=>!e.startsWith("_")&&e in i));0===s.length&&(s=["_default"]);for(const e of s)r=n(r,t(i[e]));const o=function(e,t){const n=new Map(e);for(const[e,i]of t)n.set(e,i);return n}(t(i._common),r);return new V(o)}))}static getInstance(e){return V.cache.get(Array.from(e))}static{this._locales=new r.d((()=>Object.keys(V.ambiguousCharacterData.value).filter((e=>!e.startsWith("_")))))}static getLocales(){return V._locales.value}constructor(e){this.confusableDictionary=e}isAmbiguous(e){return this.confusableDictionary.has(e)}getPrimaryConfusable(e){return this.confusableDictionary.get(e)}getConfusableCodePoints(){return new Set(this.confusableDictionary.keys())}}class q{static getRawData(){return JSON.parse("[9,10,11,12,13,32,127,160,173,847,1564,4447,4448,6068,6069,6155,6156,6157,6158,7355,7356,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8203,8204,8205,8206,8207,8234,8235,8236,8237,8238,8239,8287,8288,8289,8290,8291,8292,8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,10240,12288,12644,65024,65025,65026,65027,65028,65029,65030,65031,65032,65033,65034,65035,65036,65037,65038,65039,65279,65440,65520,65521,65522,65523,65524,65525,65526,65527,65528,65532,78844,119155,119156,119157,119158,119159,119160,119161,119162,917504,917505,917506,917507,917508,917509,917510,917511,917512,917513,917514,917515,917516,917517,917518,917519,917520,917521,917522,917523,917524,917525,917526,917527,917528,917529,917530,917531,917532,917533,917534,917535,917536,917537,917538,917539,917540,917541,917542,917543,917544,917545,917546,917547,917548,917549,917550,917551,917552,917553,917554,917555,917556,917557,917558,917559,917560,917561,917562,917563,917564,917565,917566,917567,917568,917569,917570,917571,917572,917573,917574,917575,917576,917577,917578,917579,917580,917581,917582,917583,917584,917585,917586,917587,917588,917589,917590,917591,917592,917593,917594,917595,917596,917597,917598,917599,917600,917601,917602,917603,917604,917605,917606,917607,917608,917609,917610,917611,917612,917613,917614,917615,917616,917617,917618,917619,917620,917621,917622,917623,917624,917625,917626,917627,917628,917629,917630,917631,917760,917761,917762,917763,917764,917765,917766,917767,917768,917769,917770,917771,917772,917773,917774,917775,917776,917777,917778,917779,917780,917781,917782,917783,917784,917785,917786,917787,917788,917789,917790,917791,917792,917793,917794,917795,917796,917797,917798,917799,917800,917801,917802,917803,917804,917805,917806,917807,917808,917809,917810,917811,917812,917813,917814,917815,917816,917817,917818,917819,917820,917821,917822,917823,917824,917825,917826,917827,917828,917829,917830,917831,917832,917833,917834,917835,917836,917837,917838,917839,917840,917841,917842,917843,917844,917845,917846,917847,917848,917849,917850,917851,917852,917853,917854,917855,917856,917857,917858,917859,917860,917861,917862,917863,917864,917865,917866,917867,917868,917869,917870,917871,917872,917873,917874,917875,917876,917877,917878,917879,917880,917881,917882,917883,917884,917885,917886,917887,917888,917889,917890,917891,917892,917893,917894,917895,917896,917897,917898,917899,917900,917901,917902,917903,917904,917905,917906,917907,917908,917909,917910,917911,917912,917913,917914,917915,917916,917917,917918,917919,917920,917921,917922,917923,917924,917925,917926,917927,917928,917929,917930,917931,917932,917933,917934,917935,917936,917937,917938,917939,917940,917941,917942,917943,917944,917945,917946,917947,917948,917949,917950,917951,917952,917953,917954,917955,917956,917957,917958,917959,917960,917961,917962,917963,917964,917965,917966,917967,917968,917969,917970,917971,917972,917973,917974,917975,917976,917977,917978,917979,917980,917981,917982,917983,917984,917985,917986,917987,917988,917989,917990,917991,917992,917993,917994,917995,917996,917997,917998,917999]")}static{this._data=void 0}static getData(){return this._data||(this._data=new Set(q.getRawData())),this._data}static isInvisibleCharacter(e){return q.getData().has(e)}static get codePoints(){return q.getData()}}},9359:(e,t,n)=>{"use strict";function i(e){return"string"==typeof e}function r(e){return!("object"!=typeof e||null===e||Array.isArray(e)||e instanceof RegExp||e instanceof Date)}function s(e){return void 0===e}function o(e){return s(e)||null===e}n.d(t,{Gv:()=>r,Kg:()=>i,b0:()=>s,z:()=>o})},7512:(e,t,n)=>{"use strict";function i(e){return e<0?0:e>255?255:0|e}function r(e){return e<0?0:e>4294967295?4294967295:0|e}n.d(t,{W:()=>i,j:()=>r})},7264:(e,t,n)=>{"use strict";n.d(t,{I:()=>_,r:()=>c});var i=n(4033),r=n(3339);const s=/^\w[\w\d+.-]*$/,o=/^\//,a=/^\/\//,l="",h="/",u=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class c{static isUri(e){return e instanceof c||!!e&&"string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"string"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString}constructor(e,t,n,i,r,u=!1){"object"==typeof e?(this.scheme=e.scheme||l,this.authority=e.authority||l,this.path=e.path||l,this.query=e.query||l,this.fragment=e.fragment||l):(this.scheme=function(e,t){return e||t?e:"file"}(e,u),this.authority=t||l,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==h&&(t=h+t):t=h}return t}(this.scheme,n||l),this.query=i||l,this.fragment=r||l,function(e,t){if(!e.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!s.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!o.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(a.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}(this,u))}get fsPath(){return _(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:n,path:i,query:r,fragment:s}=e;return void 0===t?t=this.scheme:null===t&&(t=l),void 0===n?n=this.authority:null===n&&(n=l),void 0===i?i=this.path:null===i&&(i=l),void 0===r?r=this.query:null===r&&(r=l),void 0===s?s=this.fragment:null===s&&(s=l),t===this.scheme&&n===this.authority&&i===this.path&&r===this.query&&s===this.fragment?this:new g(t,n,i,r,s)}static parse(e,t=!1){const n=u.exec(e);return n?new g(n[2]||l,v(n[4]||l),v(n[5]||l),v(n[7]||l),v(n[9]||l),t):new g(l,l,l,l,l)}static file(e){let t=l;if(r.uF&&(e=e.replace(/\\/g,h)),e[0]===h&&e[1]===h){const n=e.indexOf(h,2);-1===n?(t=e.substring(2),e=h):(t=e.substring(2,n),e=e.substring(n)||h)}return new g("file",t,e,l,l)}static from(e,t){return new g(e.scheme,e.authority,e.path,e.query,e.fragment,t)}static joinPath(e,...t){if(!e.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let n;return n=r.uF&&"file"===e.scheme?c.file(i.IN.join(_(e,!0),...t)).path:i.SA.join(e.path,...t),e.with({path:n})}toString(e=!1){return b(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof c)return e;{const t=new g(e);return t._formatted=e.external??null,t._fsPath=e._sep===d?e.fsPath??null:null,t}}return e}}const d=r.uF?1:void 0;class g extends c{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=_(this,!1)),this._fsPath}toString(e=!1){return e?b(this,!0):(this._formatted||(this._formatted=b(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=d),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}const f={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function m(e,t,n){let i,r=-1;for(let s=0;s<e.length;s++){const o=e.charCodeAt(s);if(o>=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||45===o||46===o||95===o||126===o||t&&47===o||n&&91===o||n&&93===o||n&&58===o)-1!==r&&(i+=encodeURIComponent(e.substring(r,s)),r=-1),void 0!==i&&(i+=e.charAt(s));else{void 0===i&&(i=e.substr(0,s));const t=f[o];void 0!==t?(-1!==r&&(i+=encodeURIComponent(e.substring(r,s)),r=-1),i+=t):-1===r&&(r=s)}}return-1!==r&&(i+=encodeURIComponent(e.substring(r))),void 0!==i?i:e}function p(e){let t;for(let n=0;n<e.length;n++){const i=e.charCodeAt(n);35===i||63===i?(void 0===t&&(t=e.substr(0,n)),t+=f[i]):void 0!==t&&(t+=e[n])}return void 0!==t?t:e}function _(e,t){let n;return n=e.authority&&e.path.length>1&&"file"===e.scheme?`//${e.authority}${e.path}`:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,r.uF&&(n=n.replace(/\//g,"\\")),n}function b(e,t){const n=t?p:m;let i="",{scheme:r,authority:s,path:o,query:a,fragment:l}=e;if(r&&(i+=r,i+=":"),(s||"file"===r)&&(i+=h,i+=h),s){let e=s.indexOf("@");if(-1!==e){const t=s.substr(0,e);s=s.substr(e+1),e=t.lastIndexOf(":"),-1===e?i+=n(t,!1,!1):(i+=n(t.substr(0,e),!1,!1),i+=":",i+=n(t.substr(e+1),!1,!0)),i+="@"}s=s.toLowerCase(),e=s.lastIndexOf(":"),-1===e?i+=n(s,!1,!0):(i+=n(s.substr(0,e),!1,!0),i+=s.substr(e))}if(o){if(o.length>=3&&47===o.charCodeAt(0)&&58===o.charCodeAt(2)){const e=o.charCodeAt(1);e>=65&&e<=90&&(o=`/${String.fromCharCode(e+32)}:${o.substr(3)}`)}else if(o.length>=2&&58===o.charCodeAt(1)){const e=o.charCodeAt(0);e>=65&&e<=90&&(o=`${String.fromCharCode(e+32)}:${o.substr(2)}`)}i+=n(o,!0,!1)}return a&&(i+="?",i+=n(a,!1,!1)),l&&(i+="#",i+=t?l:m(l,!1,!1)),i}function k(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+k(e.substr(3)):e}}const C=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function v(e){return e.match(C)?e.replace(C,(e=>k(e))):e}},5585:(e,t,n)=>{"use strict";n.r(t),n.d(t,{SimpleWorkerClient:()=>k,SimpleWorkerServer:()=>L,create:()=>w,logOnceWebWorkerWarning:()=>d});var i=n(4327),r=n(2106),s=n(9235),o=n(3072),a=n(3339),l=n(6844);const h="default",u="$initialize";let c=!1;function d(e){a.HZ&&(c||(c=!0,console.warn("Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/microsoft/monaco-editor#faq")),console.warn(e.message))}class g{constructor(e,t,n,i,r){this.vsWorker=e,this.req=t,this.channel=n,this.method=i,this.args=r,this.type=0}}class f{constructor(e,t,n,i){this.vsWorker=e,this.seq=t,this.res=n,this.err=i,this.type=1}}class m{constructor(e,t,n,i,r){this.vsWorker=e,this.req=t,this.channel=n,this.eventName=i,this.arg=r,this.type=2}}class p{constructor(e,t,n){this.vsWorker=e,this.req=t,this.event=n,this.type=3}}class _{constructor(e,t){this.vsWorker=e,this.req=t,this.type=4}}class b{constructor(e){this._workerId=-1,this._handler=e,this._lastSentReq=0,this._pendingReplies=Object.create(null),this._pendingEmitters=new Map,this._pendingEvents=new Map}setWorkerId(e){this._workerId=e}sendMessage(e,t,n){const i=String(++this._lastSentReq);return new Promise(((r,s)=>{this._pendingReplies[i]={resolve:r,reject:s},this._send(new g(this._workerId,i,e,t,n))}))}listen(e,t,n){let i=null;const s=new r.vl({onWillAddFirstListener:()=>{i=String(++this._lastSentReq),this._pendingEmitters.set(i,s),this._send(new m(this._workerId,i,e,t,n))},onDidRemoveLastListener:()=>{this._pendingEmitters.delete(i),this._send(new _(this._workerId,i)),i=null}});return s.event}handleMessage(e){e&&e.vsWorker&&(-1!==this._workerId&&e.vsWorker!==this._workerId||this._handleMessage(e))}createProxyToRemoteChannel(e,t){const n={get:(n,i)=>("string"!=typeof i||n[i]||(v(i)?n[i]=t=>this.listen(e,i,t):C(i)?n[i]=this.listen(e,i,void 0):36===i.charCodeAt(0)&&(n[i]=async(...n)=>(await(t?.()),this.sendMessage(e,i,n)))),n[i])};return new Proxy(Object.create(null),n)}_handleMessage(e){switch(e.type){case 1:return this._handleReplyMessage(e);case 0:return this._handleRequestMessage(e);case 2:return this._handleSubscribeEventMessage(e);case 3:return this._handleEventMessage(e);case 4:return this._handleUnsubscribeEventMessage(e)}}_handleReplyMessage(e){if(!this._pendingReplies[e.seq])return void console.warn("Got reply to unknown seq");const t=this._pendingReplies[e.seq];if(delete this._pendingReplies[e.seq],e.err){let n=e.err;return e.err.$isError&&(n=new Error,n.name=e.err.name,n.message=e.err.message,n.stack=e.err.stack),void t.reject(n)}t.resolve(e.res)}_handleRequestMessage(e){const t=e.req;this._handler.handleMessage(e.channel,e.method,e.args).then((e=>{this._send(new f(this._workerId,t,e,void 0))}),(e=>{e.detail instanceof Error&&(e.detail=(0,i.cU)(e.detail)),this._send(new f(this._workerId,t,void 0,(0,i.cU)(e)))}))}_handleSubscribeEventMessage(e){const t=e.req,n=this._handler.handleEvent(e.channel,e.eventName,e.arg)((e=>{this._send(new p(this._workerId,t,e))}));this._pendingEvents.set(t,n)}_handleEventMessage(e){this._pendingEmitters.has(e.req)?this._pendingEmitters.get(e.req).fire(e.event):console.warn("Got event for unknown req")}_handleUnsubscribeEventMessage(e){this._pendingEvents.has(e.req)?(this._pendingEvents.get(e.req).dispose(),this._pendingEvents.delete(e.req)):console.warn("Got unsubscribe for unknown req")}_send(e){const t=[];if(0===e.type)for(let n=0;n<e.args.length;n++)e.args[n]instanceof ArrayBuffer&&t.push(e.args[n]);else 1===e.type&&e.res instanceof ArrayBuffer&&t.push(e.res);this._handler.sendMessage(e,t)}}class k extends s.jG{constructor(e,t){super(),this._localChannels=new Map,this._worker=this._register(e.create({amdModuleId:"vs/base/common/worker/simpleWorker",esmModuleLocation:t.esmModuleLocation,label:t.label},(e=>{this._protocol.handleMessage(e)}),(e=>{(0,i.dz)(e)}))),this._protocol=new b({sendMessage:(e,t)=>{this._worker.postMessage(e,t)},handleMessage:(e,t,n)=>this._handleMessage(e,t,n),handleEvent:(e,t,n)=>this._handleEvent(e,t,n)}),this._protocol.setWorkerId(this._worker.getId());let n=null;const r=globalThis.require;void 0!==r&&"function"==typeof r.getConfig?n=r.getConfig():void 0!==globalThis.requirejs&&(n=globalThis.requirejs.s.contexts._.config),this._onModuleLoaded=this._protocol.sendMessage(h,u,[this._worker.getId(),JSON.parse(JSON.stringify(n)),t.amdModuleId]),this.proxy=this._protocol.createProxyToRemoteChannel(h,(async()=>{await this._onModuleLoaded})),this._onModuleLoaded.catch((e=>{this._onError("Worker failed to load "+t.amdModuleId,e)}))}_handleMessage(e,t,n){const i=this._localChannels.get(e);if(!i)return Promise.reject(new Error(`Missing channel ${e} on main thread`));if("function"!=typeof i[t])return Promise.reject(new Error(`Missing method ${t} on main thread channel ${e}`));try{return Promise.resolve(i[t].apply(i,n))}catch(e){return Promise.reject(e)}}_handleEvent(e,t,n){const i=this._localChannels.get(e);if(!i)throw new Error(`Missing channel ${e} on main thread`);if(v(t)){const r=i[t].call(i,n);if("function"!=typeof r)throw new Error(`Missing dynamic event ${t} on main thread channel ${e}.`);return r}if(C(t)){const n=i[t];if("function"!=typeof n)throw new Error(`Missing event ${t} on main thread channel ${e}.`);return n}throw new Error(`Malformed event name ${t}`)}setChannel(e,t){this._localChannels.set(e,t)}_onError(e,t){console.error(e),console.info(t)}}function C(e){return"o"===e[0]&&"n"===e[1]&&l.Wv(e.charCodeAt(2))}function v(e){return/^onDynamic/.test(e)&&l.Wv(e.charCodeAt(9))}class L{constructor(e,t){this._localChannels=new Map,this._remoteChannels=new Map,this._requestHandlerFactory=t,this._requestHandler=null,this._protocol=new b({sendMessage:(t,n)=>{e(t,n)},handleMessage:(e,t,n)=>this._handleMessage(e,t,n),handleEvent:(e,t,n)=>this._handleEvent(e,t,n)})}onmessage(e){this._protocol.handleMessage(e)}_handleMessage(e,t,n){if(e===h&&t===u)return this.initialize(n[0],n[1],n[2]);const i=e===h?this._requestHandler:this._localChannels.get(e);if(!i)return Promise.reject(new Error(`Missing channel ${e} on worker thread`));if("function"!=typeof i[t])return Promise.reject(new Error(`Missing method ${t} on worker thread channel ${e}`));try{return Promise.resolve(i[t].apply(i,n))}catch(e){return Promise.reject(e)}}_handleEvent(e,t,n){const i=e===h?this._requestHandler:this._localChannels.get(e);if(!i)throw new Error(`Missing channel ${e} on worker thread`);if(v(t)){const e=i[t].call(i,n);if("function"!=typeof e)throw new Error(`Missing dynamic event ${t} on request handler.`);return e}if(C(t)){const e=i[t];if("function"!=typeof e)throw new Error(`Missing event ${t} on request handler.`);return e}throw new Error(`Malformed event name ${t}`)}getChannel(e){if(!this._remoteChannels.has(e)){const t=this._protocol.createProxyToRemoteChannel(e);this._remoteChannels.set(e,t)}return this._remoteChannels.get(e)}async initialize(e,t,i){if(this._protocol.setWorkerId(e),!this._requestHandlerFactory){t&&(void 0!==t.baseUrl&&delete t.baseUrl,void 0!==t.paths&&void 0!==t.paths.vs&&delete t.paths.vs,void 0!==t.trustedTypesPolicy&&delete t.trustedTypesPolicy,t.catchError=!0,globalThis.require.config(t));{const e=o.zl.asBrowserUri(`${i}.js`).toString(!0);return n(5890)(`${e}`).then((e=>{if(this._requestHandler=e.create(this),!this._requestHandler)throw new Error("No RequestHandler!")}))}}this._requestHandler=this._requestHandlerFactory(this)}}function w(e){return new L(e,null)}},5890:(e,t,n)=>{var i={"./simpleWorker":5585,"./simpleWorker.js":5585};function r(e){return Promise.resolve().then((()=>{if(!n.o(i,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return n(i[e])}))}r.keys=()=>Object.keys(i),r.id=5890,e.exports=r},7454:(e,t,n)=>{"use strict";n.d(t,{V:()=>r});var i=n(7512);class r{constructor(e){const t=(0,i.W)(e);this._defaultValue=t,this._asciiMap=r._createAsciiMap(t),this._map=new Map}static _createAsciiMap(e){const t=new Uint8Array(256);return t.fill(e),t}set(e,t){const n=(0,i.W)(t);e>=0&&e<256?this._asciiMap[e]=n:this._map.set(e,n)}get(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue}clear(){this._asciiMap.fill(this._defaultValue),this._map.clear()}}},8295:(e,t,n)=>{"use strict";n.d(t,{AQ:()=>_,aZ:()=>p,l5:()=>v,lQ:()=>k,s7:()=>y,sH:()=>L,sN:()=>b,ss:()=>C,yI:()=>m,zp:()=>w});var i=n(9746),r=n(4901),s=n(61),o=n(5295);const a=(0,s.x1A)("editor.lineHighlightBackground",null,i.kg("lineHighlight","Background color for the highlight of line at the cursor position.")),l=((0,s.x1A)("editor.lineHighlightBorder",{dark:"#282828",light:"#eeeeee",hcDark:"#f38518",hcLight:s.b1q},i.kg("lineHighlightBorderBox","Background color for the border around the line at the cursor position.")),(0,s.x1A)("editor.rangeHighlightBackground",{dark:"#ffffff0b",light:"#fdff0033",hcDark:null,hcLight:null},i.kg("rangeHighlight","Background color of highlighted ranges, like by quick open and find features. The color must not be opaque so as not to hide underlying decorations."),!0),(0,s.x1A)("editor.rangeHighlightBorder",{dark:null,light:null,hcDark:s.buw,hcLight:s.buw},i.kg("rangeHighlightBorder","Background color of the border around highlighted ranges.")),(0,s.x1A)("editor.symbolHighlightBackground",{dark:s.Ubg,light:s.Ubg,hcDark:null,hcLight:null},i.kg("symbolHighlight","Background color of highlighted symbol, like for go to definition or go next/previous symbol. The color must not be opaque so as not to hide underlying decorations."),!0),(0,s.x1A)("editor.symbolHighlightBorder",{dark:null,light:null,hcDark:s.buw,hcLight:s.buw},i.kg("symbolHighlightBorder","Background color of the border around highlighted symbols.")),(0,s.x1A)("editorCursor.foreground",{dark:"#AEAFAD",light:r.Q1.black,hcDark:r.Q1.white,hcLight:"#0F4A85"},i.kg("caret","Color of the editor cursor."))),h=(0,s.x1A)("editorCursor.background",null,i.kg("editorCursorBackground","The background color of the editor cursor. Allows customizing the color of a character overlapped by a block cursor.")),u=((0,s.x1A)("editorMultiCursor.primary.foreground",l,i.kg("editorMultiCursorPrimaryForeground","Color of the primary editor cursor when multiple cursors are present.")),(0,s.x1A)("editorMultiCursor.primary.background",h,i.kg("editorMultiCursorPrimaryBackground","The background color of the primary editor cursor when multiple cursors are present. Allows customizing the color of a character overlapped by a block cursor.")),(0,s.x1A)("editorMultiCursor.secondary.foreground",l,i.kg("editorMultiCursorSecondaryForeground","Color of secondary editor cursors when multiple cursors are present.")),(0,s.x1A)("editorMultiCursor.secondary.background",h,i.kg("editorMultiCursorSecondaryBackground","The background color of secondary editor cursors when multiple cursors are present. Allows customizing the color of a character overlapped by a block cursor.")),(0,s.x1A)("editorWhitespace.foreground",{dark:"#e3e4e229",light:"#33333333",hcDark:"#e3e4e229",hcLight:"#CCCCCC"},i.kg("editorWhitespaces","Color of whitespace characters in the editor."))),c=((0,s.x1A)("editorLineNumber.foreground",{dark:"#858585",light:"#237893",hcDark:r.Q1.white,hcLight:"#292929"},i.kg("editorLineNumbers","Color of editor line numbers.")),(0,s.x1A)("editorIndentGuide.background",u,i.kg("editorIndentGuides","Color of the editor indentation guides."),!1,i.kg("deprecatedEditorIndentGuides","'editorIndentGuide.background' is deprecated. Use 'editorIndentGuide.background1' instead."))),d=(0,s.x1A)("editorIndentGuide.activeBackground",u,i.kg("editorActiveIndentGuide","Color of the active editor indentation guides."),!1,i.kg("deprecatedEditorActiveIndentGuide","'editorIndentGuide.activeBackground' is deprecated. Use 'editorIndentGuide.activeBackground1' instead.")),g=((0,s.x1A)("editorIndentGuide.background1",c,i.kg("editorIndentGuides1","Color of the editor indentation guides (1).")),(0,s.x1A)("editorIndentGuide.background2","#00000000",i.kg("editorIndentGuides2","Color of the editor indentation guides (2).")),(0,s.x1A)("editorIndentGuide.background3","#00000000",i.kg("editorIndentGuides3","Color of the editor indentation guides (3).")),(0,s.x1A)("editorIndentGuide.background4","#00000000",i.kg("editorIndentGuides4","Color of the editor indentation guides (4).")),(0,s.x1A)("editorIndentGuide.background5","#00000000",i.kg("editorIndentGuides5","Color of the editor indentation guides (5).")),(0,s.x1A)("editorIndentGuide.background6","#00000000",i.kg("editorIndentGuides6","Color of the editor indentation guides (6).")),(0,s.x1A)("editorIndentGuide.activeBackground1",d,i.kg("editorActiveIndentGuide1","Color of the active editor indentation guides (1).")),(0,s.x1A)("editorIndentGuide.activeBackground2","#00000000",i.kg("editorActiveIndentGuide2","Color of the active editor indentation guides (2).")),(0,s.x1A)("editorIndentGuide.activeBackground3","#00000000",i.kg("editorActiveIndentGuide3","Color of the active editor indentation guides (3).")),(0,s.x1A)("editorIndentGuide.activeBackground4","#00000000",i.kg("editorActiveIndentGuide4","Color of the active editor indentation guides (4).")),(0,s.x1A)("editorIndentGuide.activeBackground5","#00000000",i.kg("editorActiveIndentGuide5","Color of the active editor indentation guides (5).")),(0,s.x1A)("editorIndentGuide.activeBackground6","#00000000",i.kg("editorActiveIndentGuide6","Color of the active editor indentation guides (6).")),(0,s.x1A)("editorActiveLineNumber.foreground",{dark:"#c6c6c6",light:"#0B216F",hcDark:s.buw,hcLight:s.buw},i.kg("editorActiveLineNumber","Color of editor active line number"),!1,i.kg("deprecatedEditorActiveLineNumber","Id is deprecated. Use 'editorLineNumber.activeForeground' instead."))),f=((0,s.x1A)("editorLineNumber.activeForeground",g,i.kg("editorActiveLineNumber","Color of editor active line number")),(0,s.x1A)("editorLineNumber.dimmedForeground",null,i.kg("editorDimmedLineNumber","Color of the final editor line when editor.renderFinalNewline is set to dimmed.")),(0,s.x1A)("editorRuler.foreground",{dark:"#5A5A5A",light:r.Q1.lightgrey,hcDark:r.Q1.white,hcLight:"#292929"},i.kg("editorRuler","Color of the editor rulers.")),(0,s.x1A)("editorCodeLens.foreground",{dark:"#999999",light:"#919191",hcDark:"#999999",hcLight:"#292929"},i.kg("editorCodeLensForeground","Foreground color of editor CodeLens")),(0,s.x1A)("editorBracketMatch.background",{dark:"#0064001a",light:"#0064001a",hcDark:"#0064001a",hcLight:"#0000"},i.kg("editorBracketMatchBackground","Background color behind matching brackets")),(0,s.x1A)("editorBracketMatch.border",{dark:"#888",light:"#B9B9B9",hcDark:s.b1q,hcLight:s.b1q},i.kg("editorBracketMatchBorder","Color for matching brackets boxes")),(0,s.x1A)("editorOverviewRuler.border",{dark:"#7f7f7f4d",light:"#7f7f7f4d",hcDark:"#7f7f7f4d",hcLight:"#666666"},i.kg("editorOverviewRulerBorder","Color of the overview ruler border.")),(0,s.x1A)("editorOverviewRuler.background",null,i.kg("editorOverviewRulerBackground","Background color of the editor overview ruler.")),(0,s.x1A)("editorGutter.background",s.YtV,i.kg("editorGutter","Background color of the editor gutter. The gutter contains the glyph margins and the line numbers.")),(0,s.x1A)("editorUnnecessaryCode.border",{dark:null,light:null,hcDark:r.Q1.fromHex("#fff").transparent(.8),hcLight:s.b1q},i.kg("unnecessaryCodeBorder","Border color of unnecessary (unused) source code in the editor.")),(0,s.x1A)("editorUnnecessaryCode.opacity",{dark:r.Q1.fromHex("#000a"),light:r.Q1.fromHex("#0007"),hcDark:null,hcLight:null},i.kg("unnecessaryCodeOpacity","Opacity of unnecessary (unused) source code in the editor. For example, \"#000000c0\" will render the code with 75% opacity. For high contrast themes, use the  'editorUnnecessaryCode.border' theme color to underline unnecessary code instead of fading it out.")),(0,s.x1A)("editorGhostText.border",{dark:null,light:null,hcDark:r.Q1.fromHex("#fff").transparent(.8),hcLight:r.Q1.fromHex("#292929").transparent(.8)},i.kg("editorGhostTextBorder","Border color of ghost text in the editor.")),(0,s.x1A)("editorGhostText.foreground",{dark:r.Q1.fromHex("#ffffff56"),light:r.Q1.fromHex("#0007"),hcDark:null,hcLight:null},i.kg("editorGhostTextForeground","Foreground color of the ghost text in the editor.")),(0,s.x1A)("editorGhostText.background",null,i.kg("editorGhostTextBackground","Background color of the ghost text in the editor.")),new r.Q1(new r.bU(0,122,204,.6))),m=((0,s.x1A)("editorOverviewRuler.rangeHighlightForeground",f,i.kg("overviewRulerRangeHighlight","Overview ruler marker color for range highlights. The color must not be opaque so as not to hide underlying decorations."),!0),(0,s.x1A)("editorOverviewRuler.errorForeground",{dark:new r.Q1(new r.bU(255,18,18,.7)),light:new r.Q1(new r.bU(255,18,18,.7)),hcDark:new r.Q1(new r.bU(255,50,50,1)),hcLight:"#B5200D"},i.kg("overviewRuleError","Overview ruler marker color for errors."))),p=(0,s.x1A)("editorOverviewRuler.warningForeground",{dark:s.Hng,light:s.Hng,hcDark:s.Stt,hcLight:s.Stt},i.kg("overviewRuleWarning","Overview ruler marker color for warnings.")),_=(0,s.x1A)("editorOverviewRuler.infoForeground",{dark:s.pOz,light:s.pOz,hcDark:s.IIb,hcLight:s.IIb},i.kg("overviewRuleInfo","Overview ruler marker color for infos.")),b=(0,s.x1A)("editorBracketHighlight.foreground1",{dark:"#FFD700",light:"#0431FAFF",hcDark:"#FFD700",hcLight:"#0431FAFF"},i.kg("editorBracketHighlightForeground1","Foreground color of brackets (1). Requires enabling bracket pair colorization.")),k=(0,s.x1A)("editorBracketHighlight.foreground2",{dark:"#DA70D6",light:"#319331FF",hcDark:"#DA70D6",hcLight:"#319331FF"},i.kg("editorBracketHighlightForeground2","Foreground color of brackets (2). Requires enabling bracket pair colorization.")),C=(0,s.x1A)("editorBracketHighlight.foreground3",{dark:"#179FFF",light:"#7B3814FF",hcDark:"#87CEFA",hcLight:"#7B3814FF"},i.kg("editorBracketHighlightForeground3","Foreground color of brackets (3). Requires enabling bracket pair colorization.")),v=(0,s.x1A)("editorBracketHighlight.foreground4","#00000000",i.kg("editorBracketHighlightForeground4","Foreground color of brackets (4). Requires enabling bracket pair colorization.")),L=(0,s.x1A)("editorBracketHighlight.foreground5","#00000000",i.kg("editorBracketHighlightForeground5","Foreground color of brackets (5). Requires enabling bracket pair colorization.")),w=(0,s.x1A)("editorBracketHighlight.foreground6","#00000000",i.kg("editorBracketHighlightForeground6","Foreground color of brackets (6). Requires enabling bracket pair colorization.")),y=(0,s.x1A)("editorBracketHighlight.unexpectedBracket.foreground",{dark:new r.Q1(new r.bU(255,18,18,.8)),light:new r.Q1(new r.bU(255,18,18,.8)),hcDark:"new Color(new RGBA(255, 50, 50, 1))",hcLight:"#B5200D"},i.kg("editorBracketHighlightUnexpectedBracketForeground","Foreground color of unexpected brackets."));(0,s.x1A)("editorBracketPairGuide.background1","#00000000",i.kg("editorBracketPairGuide.background1","Background color of inactive bracket pair guides (1). Requires enabling bracket pair guides.")),(0,s.x1A)("editorBracketPairGuide.background2","#00000000",i.kg("editorBracketPairGuide.background2","Background color of inactive bracket pair guides (2). Requires enabling bracket pair guides.")),(0,s.x1A)("editorBracketPairGuide.background3","#00000000",i.kg("editorBracketPairGuide.background3","Background color of inactive bracket pair guides (3). Requires enabling bracket pair guides.")),(0,s.x1A)("editorBracketPairGuide.background4","#00000000",i.kg("editorBracketPairGuide.background4","Background color of inactive bracket pair guides (4). Requires enabling bracket pair guides.")),(0,s.x1A)("editorBracketPairGuide.background5","#00000000",i.kg("editorBracketPairGuide.background5","Background color of inactive bracket pair guides (5). Requires enabling bracket pair guides.")),(0,s.x1A)("editorBracketPairGuide.background6","#00000000",i.kg("editorBracketPairGuide.background6","Background color of inactive bracket pair guides (6). Requires enabling bracket pair guides.")),(0,s.x1A)("editorBracketPairGuide.activeBackground1","#00000000",i.kg("editorBracketPairGuide.activeBackground1","Background color of active bracket pair guides (1). Requires enabling bracket pair guides.")),(0,s.x1A)("editorBracketPairGuide.activeBackground2","#00000000",i.kg("editorBracketPairGuide.activeBackground2","Background color of active bracket pair guides (2). Requires enabling bracket pair guides.")),(0,s.x1A)("editorBracketPairGuide.activeBackground3","#00000000",i.kg("editorBracketPairGuide.activeBackground3","Background color of active bracket pair guides (3). Requires enabling bracket pair guides.")),(0,s.x1A)("editorBracketPairGuide.activeBackground4","#00000000",i.kg("editorBracketPairGuide.activeBackground4","Background color of active bracket pair guides (4). Requires enabling bracket pair guides.")),(0,s.x1A)("editorBracketPairGuide.activeBackground5","#00000000",i.kg("editorBracketPairGuide.activeBackground5","Background color of active bracket pair guides (5). Requires enabling bracket pair guides.")),(0,s.x1A)("editorBracketPairGuide.activeBackground6","#00000000",i.kg("editorBracketPairGuide.activeBackground6","Background color of active bracket pair guides (6). Requires enabling bracket pair guides.")),(0,s.x1A)("editorUnicodeHighlight.border",s.Hng,i.kg("editorUnicodeHighlight.border","Border color used to highlight unicode characters.")),(0,s.x1A)("editorUnicodeHighlight.background",s.whs,i.kg("editorUnicodeHighlight.background","Background color used to highlight unicode characters.")),(0,o.zy)(((e,t)=>{const n=e.getColor(s.YtV),i=e.getColor(a),r=i&&!i.isTransparent()?i:n;r&&t.addRule(`.monaco-editor .inputarea.ime-input { background-color: ${r}; }`)}))},3902:(e,t,n)=>{"use strict";function i(e){let t=0,n=0,i=0,r=0;for(let s=0,o=e.length;s<o;s++){const a=e.charCodeAt(s);13===a?(0===t&&(n=s),t++,s+1<o&&10===e.charCodeAt(s+1)?(r|=2,s++):r|=3,i=s+1):10===a&&(r|=1,0===t&&(n=s),t++,i=s+1)}return 0===t&&(n=e.length),[t,n,e.length-i,r]}n.d(t,{W:()=>i})},9955:(e,t,n)=>{"use strict";n.d(t,{M:()=>a,S:()=>l});var i=n(4327),r=n(2532),s=n(8061),o=n(7393);class a{static fromRangeInclusive(e){return new a(e.startLineNumber,e.endLineNumber+1)}static joinMany(e){if(0===e.length)return[];let t=new l(e[0].slice());for(let n=1;n<e.length;n++)t=t.getUnion(new l(e[n].slice()));return t.ranges}static join(e){if(0===e.length)throw new i.D7("lineRanges cannot be empty");let t=e[0].startLineNumber,n=e[0].endLineNumberExclusive;for(let i=1;i<e.length;i++)t=Math.min(t,e[i].startLineNumber),n=Math.max(n,e[i].endLineNumberExclusive);return new a(t,n)}static ofLength(e,t){return new a(e,e+t)}static deserialize(e){return new a(e[0],e[1])}constructor(e,t){if(e>t)throw new i.D7(`startLineNumber ${e} cannot be after endLineNumberExclusive ${t}`);this.startLineNumber=e,this.endLineNumberExclusive=t}contains(e){return this.startLineNumber<=e&&e<this.endLineNumberExclusive}get isEmpty(){return this.startLineNumber===this.endLineNumberExclusive}delta(e){return new a(this.startLineNumber+e,this.endLineNumberExclusive+e)}deltaLength(e){return new a(this.startLineNumber,this.endLineNumberExclusive+e)}get length(){return this.endLineNumberExclusive-this.startLineNumber}join(e){return new a(Math.min(this.startLineNumber,e.startLineNumber),Math.max(this.endLineNumberExclusive,e.endLineNumberExclusive))}toString(){return`[${this.startLineNumber},${this.endLineNumberExclusive})`}intersect(e){const t=Math.max(this.startLineNumber,e.startLineNumber),n=Math.min(this.endLineNumberExclusive,e.endLineNumberExclusive);if(t<=n)return new a(t,n)}intersectsStrict(e){return this.startLineNumber<e.endLineNumberExclusive&&e.startLineNumber<this.endLineNumberExclusive}overlapOrTouch(e){return this.startLineNumber<=e.endLineNumberExclusive&&e.startLineNumber<=this.endLineNumberExclusive}equals(e){return this.startLineNumber===e.startLineNumber&&this.endLineNumberExclusive===e.endLineNumberExclusive}toInclusiveRange(){return this.isEmpty?null:new s.Q(this.startLineNumber,1,this.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER)}toExclusiveRange(){return new s.Q(this.startLineNumber,1,this.endLineNumberExclusive,1)}mapToLineArray(e){const t=[];for(let n=this.startLineNumber;n<this.endLineNumberExclusive;n++)t.push(e(n));return t}forEach(e){for(let t=this.startLineNumber;t<this.endLineNumberExclusive;t++)e(t)}serialize(){return[this.startLineNumber,this.endLineNumberExclusive]}includes(e){return this.startLineNumber<=e&&e<this.endLineNumberExclusive}toOffsetRange(){return new r.L(this.startLineNumber-1,this.endLineNumberExclusive-1)}}class l{constructor(e=[]){this._normalizedRanges=e}get ranges(){return this._normalizedRanges}addRange(e){if(0===e.length)return;const t=(0,o.hw)(this._normalizedRanges,(t=>t.endLineNumberExclusive>=e.startLineNumber)),n=(0,o.iM)(this._normalizedRanges,(t=>t.startLineNumber<=e.endLineNumberExclusive))+1;if(t===n)this._normalizedRanges.splice(t,0,e);else if(t===n-1){const n=this._normalizedRanges[t];this._normalizedRanges[t]=n.join(e)}else{const i=this._normalizedRanges[t].join(this._normalizedRanges[n-1]).join(e);this._normalizedRanges.splice(t,n-t,i)}}contains(e){const t=(0,o.lx)(this._normalizedRanges,(t=>t.startLineNumber<=e));return!!t&&t.endLineNumberExclusive>e}intersects(e){const t=(0,o.lx)(this._normalizedRanges,(t=>t.startLineNumber<e.endLineNumberExclusive));return!!t&&t.endLineNumberExclusive>e.startLineNumber}getUnion(e){if(0===this._normalizedRanges.length)return e;if(0===e._normalizedRanges.length)return this;const t=[];let n=0,i=0,r=null;for(;n<this._normalizedRanges.length||i<e._normalizedRanges.length;){let s=null;if(n<this._normalizedRanges.length&&i<e._normalizedRanges.length){const t=this._normalizedRanges[n],r=e._normalizedRanges[i];t.startLineNumber<r.startLineNumber?(s=t,n++):(s=r,i++)}else n<this._normalizedRanges.length?(s=this._normalizedRanges[n],n++):(s=e._normalizedRanges[i],i++);null===r?r=s:r.endLineNumberExclusive>=s.startLineNumber?r=new a(r.startLineNumber,Math.max(r.endLineNumberExclusive,s.endLineNumberExclusive)):(t.push(r),r=s)}return null!==r&&t.push(r),new l(t)}subtractFrom(e){const t=(0,o.hw)(this._normalizedRanges,(t=>t.endLineNumberExclusive>=e.startLineNumber)),n=(0,o.iM)(this._normalizedRanges,(t=>t.startLineNumber<=e.endLineNumberExclusive))+1;if(t===n)return new l([e]);const i=[];let r=e.startLineNumber;for(let e=t;e<n;e++){const t=this._normalizedRanges[e];t.startLineNumber>r&&i.push(new a(r,t.startLineNumber)),r=t.endLineNumberExclusive}return r<e.endLineNumberExclusive&&i.push(new a(r,e.endLineNumberExclusive)),new l(i)}toString(){return this._normalizedRanges.map((e=>e.toString())).join(", ")}getIntersection(e){const t=[];let n=0,i=0;for(;n<this._normalizedRanges.length&&i<e._normalizedRanges.length;){const r=this._normalizedRanges[n],s=e._normalizedRanges[i],o=r.intersect(s);o&&!o.isEmpty&&t.push(o),r.endLineNumberExclusive<s.endLineNumberExclusive?n++:i++}return new l(t)}getWithDelta(e){return new l(this._normalizedRanges.map((t=>t.delta(e))))}}},2532:(e,t,n)=>{"use strict";n.d(t,{L:()=>r});var i=n(4327);class r{static addRange(e,t){let n=0;for(;n<t.length&&t[n].endExclusive<e.start;)n++;let i=n;for(;i<t.length&&t[i].start<=e.endExclusive;)i++;if(n===i)t.splice(n,0,e);else{const s=Math.min(e.start,t[n].start),o=Math.max(e.endExclusive,t[i-1].endExclusive);t.splice(n,i-n,new r(s,o))}}static tryCreate(e,t){if(!(e>t))return new r(e,t)}static ofLength(e){return new r(0,e)}static ofStartAndLength(e,t){return new r(e,e+t)}constructor(e,t){if(this.start=e,this.endExclusive=t,e>t)throw new i.D7(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(e){return new r(this.start+e,this.endExclusive+e)}deltaStart(e){return new r(this.start+e,this.endExclusive)}deltaEnd(e){return new r(this.start,this.endExclusive+e)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}contains(e){return this.start<=e&&e<this.endExclusive}join(e){return new r(Math.min(this.start,e.start),Math.max(this.endExclusive,e.endExclusive))}intersect(e){const t=Math.max(this.start,e.start),n=Math.min(this.endExclusive,e.endExclusive);if(t<=n)return new r(t,n)}intersects(e){return Math.max(this.start,e.start)<Math.min(this.endExclusive,e.endExclusive)}isBefore(e){return this.endExclusive<=e.start}isAfter(e){return this.start>=e.endExclusive}slice(e){return e.slice(this.start,this.endExclusive)}substring(e){return e.substring(this.start,this.endExclusive)}clip(e){if(this.isEmpty)throw new i.D7(`Invalid clipping range: ${this.toString()}`);return Math.max(this.start,Math.min(this.endExclusive-1,e))}clipCyclic(e){if(this.isEmpty)throw new i.D7(`Invalid clipping range: ${this.toString()}`);return e<this.start?this.endExclusive-(this.start-e)%this.length:e>=this.endExclusive?this.start+(e-this.start)%this.length:e}forEach(e){for(let t=this.start;t<this.endExclusive;t++)e(t)}}},5365:(e,t,n)=>{"use strict";n.d(t,{y:()=>i});class i{constructor(e,t){this.lineNumber=e,this.column=t}with(e=this.lineNumber,t=this.column){return e===this.lineNumber&&t===this.column?this:new i(e,t)}delta(e=0,t=0){return this.with(this.lineNumber+e,this.column+t)}equals(e){return i.equals(this,e)}static equals(e,t){return!e&&!t||!!e&&!!t&&e.lineNumber===t.lineNumber&&e.column===t.column}isBefore(e){return i.isBefore(this,e)}static isBefore(e,t){return e.lineNumber<t.lineNumber||!(t.lineNumber<e.lineNumber)&&e.column<t.column}isBeforeOrEqual(e){return i.isBeforeOrEqual(this,e)}static isBeforeOrEqual(e,t){return e.lineNumber<t.lineNumber||!(t.lineNumber<e.lineNumber)&&e.column<=t.column}static compare(e,t){const n=0|e.lineNumber,i=0|t.lineNumber;return n===i?(0|e.column)-(0|t.column):n-i}clone(){return new i(this.lineNumber,this.column)}toString(){return"("+this.lineNumber+","+this.column+")"}static lift(e){return new i(e.lineNumber,e.column)}static isIPosition(e){return e&&"number"==typeof e.lineNumber&&"number"==typeof e.column}toJSON(){return{lineNumber:this.lineNumber,column:this.column}}}},8061:(e,t,n)=>{"use strict";n.d(t,{Q:()=>r});var i=n(5365);class r{constructor(e,t,n,i){e>n||e===n&&t>i?(this.startLineNumber=n,this.startColumn=i,this.endLineNumber=e,this.endColumn=t):(this.startLineNumber=e,this.startColumn=t,this.endLineNumber=n,this.endColumn=i)}isEmpty(){return r.isEmpty(this)}static isEmpty(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}containsPosition(e){return r.containsPosition(this,e)}static containsPosition(e,t){return!(t.lineNumber<e.startLineNumber||t.lineNumber>e.endLineNumber||t.lineNumber===e.startLineNumber&&t.column<e.startColumn||t.lineNumber===e.endLineNumber&&t.column>e.endColumn)}static strictContainsPosition(e,t){return!(t.lineNumber<e.startLineNumber||t.lineNumber>e.endLineNumber||t.lineNumber===e.startLineNumber&&t.column<=e.startColumn||t.lineNumber===e.endLineNumber&&t.column>=e.endColumn)}containsRange(e){return r.containsRange(this,e)}static containsRange(e,t){return!(t.startLineNumber<e.startLineNumber||t.endLineNumber<e.startLineNumber||t.startLineNumber>e.endLineNumber||t.endLineNumber>e.endLineNumber||t.startLineNumber===e.startLineNumber&&t.startColumn<e.startColumn||t.endLineNumber===e.endLineNumber&&t.endColumn>e.endColumn)}strictContainsRange(e){return r.strictContainsRange(this,e)}static strictContainsRange(e,t){return!(t.startLineNumber<e.startLineNumber||t.endLineNumber<e.startLineNumber||t.startLineNumber>e.endLineNumber||t.endLineNumber>e.endLineNumber||t.startLineNumber===e.startLineNumber&&t.startColumn<=e.startColumn||t.endLineNumber===e.endLineNumber&&t.endColumn>=e.endColumn)}plusRange(e){return r.plusRange(this,e)}static plusRange(e,t){let n,i,s,o;return t.startLineNumber<e.startLineNumber?(n=t.startLineNumber,i=t.startColumn):t.startLineNumber===e.startLineNumber?(n=t.startLineNumber,i=Math.min(t.startColumn,e.startColumn)):(n=e.startLineNumber,i=e.startColumn),t.endLineNumber>e.endLineNumber?(s=t.endLineNumber,o=t.endColumn):t.endLineNumber===e.endLineNumber?(s=t.endLineNumber,o=Math.max(t.endColumn,e.endColumn)):(s=e.endLineNumber,o=e.endColumn),new r(n,i,s,o)}intersectRanges(e){return r.intersectRanges(this,e)}static intersectRanges(e,t){let n=e.startLineNumber,i=e.startColumn,s=e.endLineNumber,o=e.endColumn;const a=t.startLineNumber,l=t.startColumn,h=t.endLineNumber,u=t.endColumn;return n<a?(n=a,i=l):n===a&&(i=Math.max(i,l)),s>h?(s=h,o=u):s===h&&(o=Math.min(o,u)),n>s||n===s&&i>o?null:new r(n,i,s,o)}equalsRange(e){return r.equalsRange(this,e)}static equalsRange(e,t){return!e&&!t||!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn}getEndPosition(){return r.getEndPosition(this)}static getEndPosition(e){return new i.y(e.endLineNumber,e.endColumn)}getStartPosition(){return r.getStartPosition(this)}static getStartPosition(e){return new i.y(e.startLineNumber,e.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(e,t){return new r(this.startLineNumber,this.startColumn,e,t)}setStartPosition(e,t){return new r(e,t,this.endLineNumber,this.endColumn)}collapseToStart(){return r.collapseToStart(this)}static collapseToStart(e){return new r(e.startLineNumber,e.startColumn,e.startLineNumber,e.startColumn)}collapseToEnd(){return r.collapseToEnd(this)}static collapseToEnd(e){return new r(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn)}delta(e){return new r(this.startLineNumber+e,this.startColumn,this.endLineNumber+e,this.endColumn)}static fromPositions(e,t=e){return new r(e.lineNumber,e.column,t.lineNumber,t.column)}static lift(e){return e?new r(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):null}static isIRange(e){return e&&"number"==typeof e.startLineNumber&&"number"==typeof e.startColumn&&"number"==typeof e.endLineNumber&&"number"==typeof e.endColumn}static areIntersectingOrTouching(e,t){return!(e.endLineNumber<t.startLineNumber||e.endLineNumber===t.startLineNumber&&e.endColumn<t.startColumn||t.endLineNumber<e.startLineNumber||t.endLineNumber===e.startLineNumber&&t.endColumn<e.startColumn)}static areIntersecting(e,t){return!(e.endLineNumber<t.startLineNumber||e.endLineNumber===t.startLineNumber&&e.endColumn<=t.startColumn||t.endLineNumber<e.startLineNumber||t.endLineNumber===e.startLineNumber&&t.endColumn<=e.startColumn)}static compareRangesUsingStarts(e,t){if(e&&t){const n=0|e.startLineNumber,i=0|t.startLineNumber;if(n===i){const n=0|e.startColumn,i=0|t.startColumn;if(n===i){const n=0|e.endLineNumber,i=0|t.endLineNumber;return n===i?(0|e.endColumn)-(0|t.endColumn):n-i}return n-i}return n-i}return(e?1:0)-(t?1:0)}static compareRangesUsingEnds(e,t){return e.endLineNumber===t.endLineNumber?e.endColumn===t.endColumn?e.startLineNumber===t.startLineNumber?e.startColumn-t.startColumn:e.startLineNumber-t.startLineNumber:e.endColumn-t.endColumn:e.endLineNumber-t.endLineNumber}static spansMultipleLines(e){return e.endLineNumber>e.startLineNumber}toJSON(){return this}}},3702:(e,t,n)=>{"use strict";n.d(t,{L:()=>s});var i=n(5365),r=n(8061);class s extends r.Q{constructor(e,t,n,i){super(e,t,n,i),this.selectionStartLineNumber=e,this.selectionStartColumn=t,this.positionLineNumber=n,this.positionColumn=i}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(e){return s.selectionsEqual(this,e)}static selectionsEqual(e,t){return e.selectionStartLineNumber===t.selectionStartLineNumber&&e.selectionStartColumn===t.selectionStartColumn&&e.positionLineNumber===t.positionLineNumber&&e.positionColumn===t.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(e,t){return 0===this.getDirection()?new s(this.startLineNumber,this.startColumn,e,t):new s(e,t,this.startLineNumber,this.startColumn)}getPosition(){return new i.y(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new i.y(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(e,t){return 0===this.getDirection()?new s(e,t,this.endLineNumber,this.endColumn):new s(this.endLineNumber,this.endColumn,e,t)}static fromPositions(e,t=e){return new s(e.lineNumber,e.column,t.lineNumber,t.column)}static fromRange(e,t){return 0===t?new s(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):new s(e.endLineNumber,e.endColumn,e.startLineNumber,e.startColumn)}static liftSelection(e){return new s(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)}static selectionsArrEqual(e,t){if(e&&!t||!e&&t)return!1;if(!e&&!t)return!0;if(e.length!==t.length)return!1;for(let n=0,i=e.length;n<i;n++)if(!this.selectionsEqual(e[n],t[n]))return!1;return!0}static isISelection(e){return e&&"number"==typeof e.selectionStartLineNumber&&"number"==typeof e.selectionStartColumn&&"number"==typeof e.positionLineNumber&&"number"==typeof e.positionColumn}static createWithDirection(e,t,n,i,r){return 0===r?new s(e,t,n,i):new s(n,i,e,t)}}},8357:(e,t,n)=>{"use strict";n.d(t,{W:()=>s});var i=n(5365),r=n(8061);class s{static{this.zero=new s(0,0)}static betweenPositions(e,t){return e.lineNumber===t.lineNumber?new s(0,t.column-e.column):new s(t.lineNumber-e.lineNumber,t.column-1)}static ofRange(e){return s.betweenPositions(e.getStartPosition(),e.getEndPosition())}static ofText(e){let t=0,n=0;for(const i of e)"\n"===i?(t++,n=0):n++;return new s(t,n)}constructor(e,t){this.lineCount=e,this.columnCount=t}isGreaterThanOrEqualTo(e){return this.lineCount!==e.lineCount?this.lineCount>e.lineCount:this.columnCount>=e.columnCount}createRange(e){return 0===this.lineCount?new r.Q(e.lineNumber,e.column,e.lineNumber,e.column+this.columnCount):new r.Q(e.lineNumber,e.column,e.lineNumber+this.lineCount,this.columnCount+1)}addToPosition(e){return 0===this.lineCount?new i.y(e.lineNumber,e.column+this.columnCount):new i.y(e.lineNumber+this.lineCount,this.columnCount+1)}toString(){return`${this.lineCount},${this.columnCount}`}}},8782:(e,t,n)=>{"use strict";n.d(t,{Io:()=>o,Ld:()=>s,Th:()=>l});var i=n(7954),r=n(5525);const s=function(e=""){let t="(-?\\d*\\.\\d\\w*)|([^";for(const n of"`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?")e.indexOf(n)>=0||(t+="\\"+n);return t+="\\s]+)",new RegExp(t,"g")}();function o(e){let t=s;if(e&&e instanceof RegExp)if(e.global)t=e;else{let n="g";e.ignoreCase&&(n+="i"),e.multiline&&(n+="m"),e.unicode&&(n+="u"),t=new RegExp(e.source,n)}return t.lastIndex=0,t}const a=new r.w;function l(e,t,n,r,s){if(t=o(t),s||(s=i.f.first(a)),n.length>s.maxLen){let i=e-s.maxLen/2;return i<0?i=0:r+=i,l(e,t,n=n.substring(i,e+s.maxLen/2),r,s)}const u=Date.now(),c=e-1-r;let d=-1,g=null;for(let e=1;!(Date.now()-u>=s.timeBudget);e++){const i=c-s.windowSize*e;t.lastIndex=Math.max(0,i);const r=h(t,n,c,d);if(!r&&g)break;if(g=r,i<=0)break;d=i}if(g){const e={word:g[0],startColumn:r+1+g.index,endColumn:r+1+g.index+g[0].length};return t.lastIndex=0,e}return null}function h(e,t,n,i){let r;for(;r=e.exec(t);){const t=r.index||0;if(t<=n&&e.lastIndex>=n)return r;if(i>0&&t>i)return null}return null}a.unshift({maxLen:1e3,windowSize:15,timeBudget:150})},5910:(e,t,n)=>{"use strict";n.d(t,{x:()=>i});class i{static getLanguageId(e){return(255&e)>>>0}static getTokenType(e){return(768&e)>>>8}static containsBalancedBrackets(e){return!!(1024&e)}static getFontStyle(e){return(30720&e)>>>11}static getForeground(e){return(16744448&e)>>>15}static getBackground(e){return(4278190080&e)>>>24}static getClassNameFromMetadata(e){let t="mtk"+this.getForeground(e);const n=this.getFontStyle(e);return 1&n&&(t+=" mtki"),2&n&&(t+=" mtkb"),4&n&&(t+=" mtku"),8&n&&(t+=" mtks"),t}static getInlineStyleFromMetadata(e,t){const n=this.getForeground(e),i=this.getFontStyle(e);let r=`color: ${t[n]};`;1&i&&(r+="font-style: italic;"),2&i&&(r+="font-weight: bold;");let s="";return 4&i&&(s+=" underline"),8&i&&(s+=" line-through"),s&&(r+=`text-decoration:${s};`),r}static getPresentationFromMetadata(e){const t=this.getForeground(e),n=this.getFontStyle(e);return{foreground:t,italic:Boolean(1&n),bold:Boolean(2&n),underline:Boolean(4&n),strikethrough:Boolean(8&n)}}}},4364:(e,t,n)=>{"use strict";n.d(t,{rY:()=>v,ou:()=>C,dG:()=>w,OB:()=>y});var i=n(1869),r=(n(7264),n(2106)),s=n(9235);class o{constructor(){this._tokenizationSupports=new Map,this._factories=new Map,this._onDidChange=new r.vl,this.onDidChange=this._onDidChange.event,this._colorMap=null}handleChange(e){this._onDidChange.fire({changedLanguages:e,changedColorMap:!1})}register(e,t){return this._tokenizationSupports.set(e,t),this.handleChange([e]),(0,s.s)((()=>{this._tokenizationSupports.get(e)===t&&(this._tokenizationSupports.delete(e),this.handleChange([e]))}))}get(e){return this._tokenizationSupports.get(e)||null}registerFactory(e,t){this._factories.get(e)?.dispose();const n=new a(this,e,t);return this._factories.set(e,n),(0,s.s)((()=>{const t=this._factories.get(e);t&&t===n&&(this._factories.delete(e),t.dispose())}))}async getOrCreate(e){const t=this.get(e);if(t)return t;const n=this._factories.get(e);return!n||n.isResolved?null:(await n.resolve(),this.get(e))}isResolved(e){if(this.get(e))return!0;const t=this._factories.get(e);return!(t&&!t.isResolved)}setColorMap(e){this._colorMap=e,this._onDidChange.fire({changedLanguages:Array.from(this._tokenizationSupports.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}}class a extends s.jG{get isResolved(){return this._isResolved}constructor(e,t,n){super(),this._registry=e,this._languageId=t,this._factory=n,this._isDisposed=!1,this._resolvePromise=null,this._isResolved=!1}dispose(){this._isDisposed=!0,super.dispose()}async resolve(){return this._resolvePromise||(this._resolvePromise=this._create()),this._resolvePromise}async _create(){const e=await this._factory.tokenizationSupport;this._isResolved=!0,e&&!this._isDisposed&&this._register(this._registry.register(this._languageId,e))}}var l,h,u,c,d,g,f,m,p,_,b,k=n(9746);class C{constructor(e,t,n){this.offset=e,this.type=t,this.language=n,this._tokenBrand=void 0}toString(){return"("+this.offset+", "+this.type+")"}}class v{constructor(e,t){this.tokens=e,this.endState=t,this._encodedTokenizationResultBrand=void 0}}!function(e){e[e.Increase=0]="Increase",e[e.Decrease=1]="Decrease"}(l||(l={})),function(e){const t=new Map;t.set(0,i.W.symbolMethod),t.set(1,i.W.symbolFunction),t.set(2,i.W.symbolConstructor),t.set(3,i.W.symbolField),t.set(4,i.W.symbolVariable),t.set(5,i.W.symbolClass),t.set(6,i.W.symbolStruct),t.set(7,i.W.symbolInterface),t.set(8,i.W.symbolModule),t.set(9,i.W.symbolProperty),t.set(10,i.W.symbolEvent),t.set(11,i.W.symbolOperator),t.set(12,i.W.symbolUnit),t.set(13,i.W.symbolValue),t.set(15,i.W.symbolEnum),t.set(14,i.W.symbolConstant),t.set(15,i.W.symbolEnum),t.set(16,i.W.symbolEnumMember),t.set(17,i.W.symbolKeyword),t.set(27,i.W.symbolSnippet),t.set(18,i.W.symbolText),t.set(19,i.W.symbolColor),t.set(20,i.W.symbolFile),t.set(21,i.W.symbolReference),t.set(22,i.W.symbolCustomColor),t.set(23,i.W.symbolFolder),t.set(24,i.W.symbolTypeParameter),t.set(25,i.W.account),t.set(26,i.W.issues),e.toIcon=function(e){let n=t.get(e);return n||(console.info("No codicon found for CompletionItemKind "+e),n=i.W.symbolProperty),n};const n=new Map;n.set("method",0),n.set("function",1),n.set("constructor",2),n.set("field",3),n.set("variable",4),n.set("class",5),n.set("struct",6),n.set("interface",7),n.set("module",8),n.set("property",9),n.set("event",10),n.set("operator",11),n.set("unit",12),n.set("value",13),n.set("constant",14),n.set("enum",15),n.set("enum-member",16),n.set("enumMember",16),n.set("keyword",17),n.set("snippet",27),n.set("text",18),n.set("color",19),n.set("file",20),n.set("reference",21),n.set("customcolor",22),n.set("folder",23),n.set("type-parameter",24),n.set("typeParameter",24),n.set("account",25),n.set("issue",26),e.fromString=function(e,t){let i=n.get(e);return void 0!==i||t||(i=9),i}}(h||(h={})),function(e){e[e.Automatic=0]="Automatic",e[e.Explicit=1]="Explicit"}(u||(u={})),function(e){e[e.Automatic=0]="Automatic",e[e.PasteAs=1]="PasteAs"}(c||(c={})),function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"}(d||(d={})),function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"}(g||(g={})),(0,k.kg)("Array","array"),(0,k.kg)("Boolean","boolean"),(0,k.kg)("Class","class"),(0,k.kg)("Constant","constant"),(0,k.kg)("Constructor","constructor"),(0,k.kg)("Enum","enumeration"),(0,k.kg)("EnumMember","enumeration member"),(0,k.kg)("Event","event"),(0,k.kg)("Field","field"),(0,k.kg)("File","file"),(0,k.kg)("Function","function"),(0,k.kg)("Interface","interface"),(0,k.kg)("Key","key"),(0,k.kg)("Method","method"),(0,k.kg)("Module","module"),(0,k.kg)("Namespace","namespace"),(0,k.kg)("Null","null"),(0,k.kg)("Number","number"),(0,k.kg)("Object","object"),(0,k.kg)("Operator","operator"),(0,k.kg)("Package","package"),(0,k.kg)("Property","property"),(0,k.kg)("String","string"),(0,k.kg)("Struct","struct"),(0,k.kg)("TypeParameter","type parameter"),(0,k.kg)("Variable","variable"),function(e){const t=new Map;t.set(0,i.W.symbolFile),t.set(1,i.W.symbolModule),t.set(2,i.W.symbolNamespace),t.set(3,i.W.symbolPackage),t.set(4,i.W.symbolClass),t.set(5,i.W.symbolMethod),t.set(6,i.W.symbolProperty),t.set(7,i.W.symbolField),t.set(8,i.W.symbolConstructor),t.set(9,i.W.symbolEnum),t.set(10,i.W.symbolInterface),t.set(11,i.W.symbolFunction),t.set(12,i.W.symbolVariable),t.set(13,i.W.symbolConstant),t.set(14,i.W.symbolString),t.set(15,i.W.symbolNumber),t.set(16,i.W.symbolBoolean),t.set(17,i.W.symbolArray),t.set(18,i.W.symbolObject),t.set(19,i.W.symbolKey),t.set(20,i.W.symbolNull),t.set(21,i.W.symbolEnumMember),t.set(22,i.W.symbolStruct),t.set(23,i.W.symbolEvent),t.set(24,i.W.symbolOperator),t.set(25,i.W.symbolTypeParameter),e.toIcon=function(e){let n=t.get(e);return n||(console.info("No codicon found for SymbolKind "+e),n=i.W.symbolProperty),n}}(f||(f={}));class L{static{this.Comment=new L("comment")}static{this.Imports=new L("imports")}static{this.Region=new L("region")}static fromValue(e){switch(e){case"comment":return L.Comment;case"imports":return L.Imports;case"region":return L.Region}return new L(e)}constructor(e){this.value=e}}!function(e){e[e.AIGenerated=1]="AIGenerated"}(m||(m={})),function(e){e[e.Invoke=0]="Invoke",e[e.Automatic=1]="Automatic"}(p||(p={})),function(e){e.is=function(e){return!(!e||"object"!=typeof e)&&"string"==typeof e.id&&"string"==typeof e.title}}(_||(_={})),function(e){e[e.Type=1]="Type",e[e.Parameter=2]="Parameter"}(b||(b={}));const w=new o,y=new o;var S;!function(e){e[e.Invoke=0]="Invoke",e[e.Automatic=1]="Automatic"}(S||(S={}))},7922:(e,t,n)=>{"use strict";n.d(t,{L:()=>i});const i=(0,n(2399).u1)("languageService")},4957:(e,t,n)=>{"use strict";n.d(t,{W6:()=>l,vH:()=>h});var i=n(9746),r=n(2106),s=n(7167),o=n(3720),a=n(7142);const l=new class{constructor(){this._onDidChangeLanguages=new r.vl,this.onDidChangeLanguages=this._onDidChangeLanguages.event,this._languages=[]}registerLanguage(e){return this._languages.push(e),this._onDidChangeLanguages.fire(void 0),{dispose:()=>{for(let t=0,n=this._languages.length;t<n;t++)if(this._languages[t]===e)return void this._languages.splice(t,1)}}}getLanguages(){return this._languages}};s.O.add("editor.modesRegistry",l);const h="plaintext";l.registerLanguage({id:h,extensions:[".txt"],aliases:[i.kg("plainText.alias","Plain Text"),"text"],mimetypes:[o.K.text]}),s.O.as(a.Fd.Configuration).registerDefaultConfigurations([{overrides:{"[plaintext]":{"editor.unicodeHighlight.ambiguousCharacters":!1,"editor.unicodeHighlight.invisibleCharacters":!1}}}])},6055:(e,t,n)=>{"use strict";n.d(t,{A5:()=>i,Dg:()=>l,F4:()=>d,L5:()=>c,Wo:()=>u,X2:()=>a,ZS:()=>r,nk:()=>h,vd:()=>g});var i,r,s,o=n(1386);!function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"}(i||(i={})),function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=3]="Right"}(r||(r={})),function(e){e[e.Both=0]="Both",e[e.Right=1]="Right",e[e.Left=2]="Left",e[e.None=3]="None"}(s||(s={}));class a{get originalIndentSize(){return this._indentSizeIsTabSize?"tabSize":this.indentSize}constructor(e){this._textModelResolvedOptionsBrand=void 0,this.tabSize=Math.max(1,0|e.tabSize),"tabSize"===e.indentSize?(this.indentSize=this.tabSize,this._indentSizeIsTabSize=!0):(this.indentSize=Math.max(1,0|e.indentSize),this._indentSizeIsTabSize=!1),this.insertSpaces=Boolean(e.insertSpaces),this.defaultEOL=0|e.defaultEOL,this.trimAutoWhitespace=Boolean(e.trimAutoWhitespace),this.bracketPairColorizationOptions=e.bracketPairColorizationOptions}equals(e){return this.tabSize===e.tabSize&&this._indentSizeIsTabSize===e._indentSizeIsTabSize&&this.indentSize===e.indentSize&&this.insertSpaces===e.insertSpaces&&this.defaultEOL===e.defaultEOL&&this.trimAutoWhitespace===e.trimAutoWhitespace&&(0,o.aI)(this.bracketPairColorizationOptions,e.bracketPairColorizationOptions)}createChangeEvent(e){return{tabSize:this.tabSize!==e.tabSize,indentSize:this.indentSize!==e.indentSize,insertSpaces:this.insertSpaces!==e.insertSpaces,trimAutoWhitespace:this.trimAutoWhitespace!==e.trimAutoWhitespace}}}class l{constructor(e,t){this._findMatchBrand=void 0,this.range=e,this.matches=t}}function h(e){return e&&"function"==typeof e.read}class u{constructor(e,t,n,i,r,s){this.identifier=e,this.range=t,this.text=n,this.forceMoveMarkers=i,this.isAutoWhitespaceEdit=r,this._isTracked=s}}class c{constructor(e,t,n){this.regex=e,this.wordSeparators=t,this.simpleSearch=n}}class d{constructor(e,t,n){this.reverseEdits=e,this.changes=t,this.trimAutoWhitespaceLineNumbers=n}}function g(e){return!e.isTooLargeForSyncing()&&!e.isForSimpleWidget}},2007:(e,t,n)=>{"use strict";n.d(t,{lt:()=>c,W5:()=>p,hB:()=>f,dr:()=>d,wC:()=>m});var i=n(6844),r=n(7992),s=n(7454);class o extends s.V{constructor(e,t){super(0),this._segmenter=null,this._cachedLine=null,this._cachedSegments=[],this.intlSegmenterLocales=t,this.intlSegmenterLocales.length>0?this._segmenter=new Intl.Segmenter(this.intlSegmenterLocales,{granularity:"word"}):this._segmenter=null;for(let t=0,n=e.length;t<n;t++)this.set(e.charCodeAt(t),2);this.set(32,1),this.set(9,1)}findPrevIntlWordBeforeOrAtOffset(e,t){let n=null;for(const i of this._getIntlSegmenterWordsOnLine(e)){if(i.index>t)break;n=i}return n}findNextIntlWordAtOrAfterOffset(e,t){for(const n of this._getIntlSegmenterWordsOnLine(e))if(!(n.index<t))return n;return null}_getIntlSegmenterWordsOnLine(e){return this._segmenter?(this._cachedLine===e||(this._cachedLine=e,this._cachedSegments=this._filterWordSegments(this._segmenter.segment(e))),this._cachedSegments):[]}_filterWordSegments(e){const t=[];for(const n of e)this._isWordLike(n)&&t.push(n);return t}_isWordLike(e){return!!e.isWordLike}}const a=new r.qK(10);var l=n(5365),h=n(8061),u=n(6055);class c{constructor(e,t,n,i){this.searchString=e,this.isRegex=t,this.matchCase=n,this.wordSeparators=i}parseSearchRequest(){if(""===this.searchString)return null;let e;e=this.isRegex?function(e){if(!e||0===e.length)return!1;for(let t=0,n=e.length;t<n;t++){const i=e.charCodeAt(t);if(10===i)return!0;if(92===i){if(t++,t>=n)break;const i=e.charCodeAt(t);if(110===i||114===i||87===i)return!0}}return!1}(this.searchString):this.searchString.indexOf("\n")>=0;let t=null;try{t=i.OS(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:e,global:!0,unicode:!0})}catch(e){return null}if(!t)return null;let n=!this.isRegex&&!e;return n&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(n=this.matchCase),new u.L5(t,this.wordSeparators?function(e,t){const n=`${e}/${t.join(",")}`;let i=a.get(n);return i||(i=new o(e,t),a.set(n,i)),i}(this.wordSeparators,[]):null,n?this.searchString:null)}}function d(e,t,n){if(!n)return new u.Dg(e,null);const i=[];for(let e=0,n=t.length;e<n;e++)i[e]=t[e];return new u.Dg(e,i)}class g{constructor(e){const t=[];let n=0;for(let i=0,r=e.length;i<r;i++)10===e.charCodeAt(i)&&(t[n++]=i);this._lineFeedsOffsets=t}findLineFeedCountBeforeOffset(e){const t=this._lineFeedsOffsets;let n=0,i=t.length-1;if(-1===i)return 0;if(e<=t[0])return 0;for(;n<i;){const r=n+((i-n)/2|0);t[r]>=e?i=r-1:t[r+1]>=e?(n=r,i=r):n=r+1}return n+1}}class f{static findMatches(e,t,n,i,r){const s=t.parseSearchRequest();return s?s.regex.multiline?this._doFindMatchesMultiline(e,n,new p(s.wordSeparators,s.regex),i,r):this._doFindMatchesLineByLine(e,n,s,i,r):[]}static _getMultilineMatchRange(e,t,n,i,r,s){let o,a,l=0;if(i?(l=i.findLineFeedCountBeforeOffset(r),o=t+r+l):o=t+r,i){const e=i.findLineFeedCountBeforeOffset(r+s.length)-l;a=o+s.length+e}else a=o+s.length;const u=e.getPositionAt(o),c=e.getPositionAt(a);return new h.Q(u.lineNumber,u.column,c.lineNumber,c.column)}static _doFindMatchesMultiline(e,t,n,i,r){const s=e.getOffsetAt(t.getStartPosition()),o=e.getValueInRange(t,1),a="\r\n"===e.getEOL()?new g(o):null,l=[];let h,u=0;for(n.reset(0);h=n.next(o);)if(l[u++]=d(this._getMultilineMatchRange(e,s,o,a,h.index,h[0]),h,i),u>=r)return l;return l}static _doFindMatchesLineByLine(e,t,n,i,r){const s=[];let o=0;if(t.startLineNumber===t.endLineNumber){const a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1);return o=this._findMatchesInLine(n,a,t.startLineNumber,t.startColumn-1,o,s,i,r),s}const a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1);o=this._findMatchesInLine(n,a,t.startLineNumber,t.startColumn-1,o,s,i,r);for(let a=t.startLineNumber+1;a<t.endLineNumber&&o<r;a++)o=this._findMatchesInLine(n,e.getLineContent(a),a,0,o,s,i,r);if(o<r){const a=e.getLineContent(t.endLineNumber).substring(0,t.endColumn-1);o=this._findMatchesInLine(n,a,t.endLineNumber,0,o,s,i,r)}return s}static _findMatchesInLine(e,t,n,i,r,s,o,a){const l=e.wordSeparators;if(!o&&e.simpleSearch){const o=e.simpleSearch,c=o.length,d=t.length;let g=-c;for(;-1!==(g=t.indexOf(o,g+c));)if((!l||m(l,t,d,g,c))&&(s[r++]=new u.Dg(new h.Q(n,g+1+i,n,g+1+c+i),null),r>=a))return r;return r}const c=new p(e.wordSeparators,e.regex);let g;c.reset(0);do{if(g=c.next(t),g&&(s[r++]=d(new h.Q(n,g.index+1+i,n,g.index+1+g[0].length+i),g,o),r>=a))return r}while(g);return r}static findNextMatch(e,t,n,i){const r=t.parseSearchRequest();if(!r)return null;const s=new p(r.wordSeparators,r.regex);return r.regex.multiline?this._doFindNextMatchMultiline(e,n,s,i):this._doFindNextMatchLineByLine(e,n,s,i)}static _doFindNextMatchMultiline(e,t,n,i){const r=new l.y(t.lineNumber,1),s=e.getOffsetAt(r),o=e.getLineCount(),a=e.getValueInRange(new h.Q(r.lineNumber,r.column,o,e.getLineMaxColumn(o)),1),u="\r\n"===e.getEOL()?new g(a):null;n.reset(t.column-1);const c=n.next(a);return c?d(this._getMultilineMatchRange(e,s,a,u,c.index,c[0]),c,i):1!==t.lineNumber||1!==t.column?this._doFindNextMatchMultiline(e,new l.y(1,1),n,i):null}static _doFindNextMatchLineByLine(e,t,n,i){const r=e.getLineCount(),s=t.lineNumber,o=e.getLineContent(s),a=this._findFirstMatchInLine(n,o,s,t.column,i);if(a)return a;for(let t=1;t<=r;t++){const o=(s+t-1)%r,a=e.getLineContent(o+1),l=this._findFirstMatchInLine(n,a,o+1,1,i);if(l)return l}return null}static _findFirstMatchInLine(e,t,n,i,r){e.reset(i-1);const s=e.next(t);return s?d(new h.Q(n,s.index+1,n,s.index+1+s[0].length),s,r):null}static findPreviousMatch(e,t,n,i){const r=t.parseSearchRequest();if(!r)return null;const s=new p(r.wordSeparators,r.regex);return r.regex.multiline?this._doFindPreviousMatchMultiline(e,n,s,i):this._doFindPreviousMatchLineByLine(e,n,s,i)}static _doFindPreviousMatchMultiline(e,t,n,i){const r=this._doFindMatchesMultiline(e,new h.Q(1,1,t.lineNumber,t.column),n,i,9990);if(r.length>0)return r[r.length-1];const s=e.getLineCount();return t.lineNumber!==s||t.column!==e.getLineMaxColumn(s)?this._doFindPreviousMatchMultiline(e,new l.y(s,e.getLineMaxColumn(s)),n,i):null}static _doFindPreviousMatchLineByLine(e,t,n,i){const r=e.getLineCount(),s=t.lineNumber,o=e.getLineContent(s).substring(0,t.column-1),a=this._findLastMatchInLine(n,o,s,i);if(a)return a;for(let t=1;t<=r;t++){const o=(r+s-t-1)%r,a=e.getLineContent(o+1),l=this._findLastMatchInLine(n,a,o+1,i);if(l)return l}return null}static _findLastMatchInLine(e,t,n,i){let r,s=null;for(e.reset(0);r=e.next(t);)s=d(new h.Q(n,r.index+1,n,r.index+1+r[0].length),r,i);return s}}function m(e,t,n,i,r){return function(e,t,n,i,r){if(0===i)return!0;const s=t.charCodeAt(i-1);if(0!==e.get(s))return!0;if(13===s||10===s)return!0;if(r>0){const n=t.charCodeAt(i);if(0!==e.get(n))return!0}return!1}(e,t,0,i,r)&&function(e,t,n,i,r){if(i+r===n)return!0;const s=t.charCodeAt(i+r);if(0!==e.get(s))return!0;if(13===s||10===s)return!0;if(r>0){const n=t.charCodeAt(i+r-1);if(0!==e.get(n))return!0}return!1}(e,t,n,i,r)}class p{constructor(e,t){this._wordSeparators=e,this._searchRegex=t,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(e){const t=e.length;let n;do{if(this._prevMatchStartIndex+this._prevMatchLength===t)return null;if(n=this._searchRegex.exec(e),!n)return null;const r=n.index,s=n[0].length;if(r===this._prevMatchStartIndex&&s===this._prevMatchLength){if(0===s){i.Z5(e,t,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=r,this._prevMatchLength=s,!this._wordSeparators||m(this._wordSeparators,e,t,r,s))return n}while(n);return null}}},4858:(e,t,n)=>{"use strict";n.r(t),n.d(t,{KeyMod:()=>fe,createMonacoBaseAPI:()=>me});var i=n(8903),r=n(2106);class s{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}}const o=new s,a=new s,l=new s,h=new Array(230),u={},c=[],d=Object.create(null),g=Object.create(null),f=[],m=[];for(let e=0;e<=193;e++)f[e]=-1;for(let e=0;e<=132;e++)m[e]=-1;var p;!function(){const e="",t=[[1,0,"None",0,"unknown",0,"VK_UNKNOWN",e,e],[1,1,"Hyper",0,e,0,e,e,e],[1,2,"Super",0,e,0,e,e,e],[1,3,"Fn",0,e,0,e,e,e],[1,4,"FnLock",0,e,0,e,e,e],[1,5,"Suspend",0,e,0,e,e,e],[1,6,"Resume",0,e,0,e,e,e],[1,7,"Turbo",0,e,0,e,e,e],[1,8,"Sleep",0,e,0,"VK_SLEEP",e,e],[1,9,"WakeUp",0,e,0,e,e,e],[0,10,"KeyA",31,"A",65,"VK_A",e,e],[0,11,"KeyB",32,"B",66,"VK_B",e,e],[0,12,"KeyC",33,"C",67,"VK_C",e,e],[0,13,"KeyD",34,"D",68,"VK_D",e,e],[0,14,"KeyE",35,"E",69,"VK_E",e,e],[0,15,"KeyF",36,"F",70,"VK_F",e,e],[0,16,"KeyG",37,"G",71,"VK_G",e,e],[0,17,"KeyH",38,"H",72,"VK_H",e,e],[0,18,"KeyI",39,"I",73,"VK_I",e,e],[0,19,"KeyJ",40,"J",74,"VK_J",e,e],[0,20,"KeyK",41,"K",75,"VK_K",e,e],[0,21,"KeyL",42,"L",76,"VK_L",e,e],[0,22,"KeyM",43,"M",77,"VK_M",e,e],[0,23,"KeyN",44,"N",78,"VK_N",e,e],[0,24,"KeyO",45,"O",79,"VK_O",e,e],[0,25,"KeyP",46,"P",80,"VK_P",e,e],[0,26,"KeyQ",47,"Q",81,"VK_Q",e,e],[0,27,"KeyR",48,"R",82,"VK_R",e,e],[0,28,"KeyS",49,"S",83,"VK_S",e,e],[0,29,"KeyT",50,"T",84,"VK_T",e,e],[0,30,"KeyU",51,"U",85,"VK_U",e,e],[0,31,"KeyV",52,"V",86,"VK_V",e,e],[0,32,"KeyW",53,"W",87,"VK_W",e,e],[0,33,"KeyX",54,"X",88,"VK_X",e,e],[0,34,"KeyY",55,"Y",89,"VK_Y",e,e],[0,35,"KeyZ",56,"Z",90,"VK_Z",e,e],[0,36,"Digit1",22,"1",49,"VK_1",e,e],[0,37,"Digit2",23,"2",50,"VK_2",e,e],[0,38,"Digit3",24,"3",51,"VK_3",e,e],[0,39,"Digit4",25,"4",52,"VK_4",e,e],[0,40,"Digit5",26,"5",53,"VK_5",e,e],[0,41,"Digit6",27,"6",54,"VK_6",e,e],[0,42,"Digit7",28,"7",55,"VK_7",e,e],[0,43,"Digit8",29,"8",56,"VK_8",e,e],[0,44,"Digit9",30,"9",57,"VK_9",e,e],[0,45,"Digit0",21,"0",48,"VK_0",e,e],[1,46,"Enter",3,"Enter",13,"VK_RETURN",e,e],[1,47,"Escape",9,"Escape",27,"VK_ESCAPE",e,e],[1,48,"Backspace",1,"Backspace",8,"VK_BACK",e,e],[1,49,"Tab",2,"Tab",9,"VK_TAB",e,e],[1,50,"Space",10,"Space",32,"VK_SPACE",e,e],[0,51,"Minus",88,"-",189,"VK_OEM_MINUS","-","OEM_MINUS"],[0,52,"Equal",86,"=",187,"VK_OEM_PLUS","=","OEM_PLUS"],[0,53,"BracketLeft",92,"[",219,"VK_OEM_4","[","OEM_4"],[0,54,"BracketRight",94,"]",221,"VK_OEM_6","]","OEM_6"],[0,55,"Backslash",93,"\\",220,"VK_OEM_5","\\","OEM_5"],[0,56,"IntlHash",0,e,0,e,e,e],[0,57,"Semicolon",85,";",186,"VK_OEM_1",";","OEM_1"],[0,58,"Quote",95,"'",222,"VK_OEM_7","'","OEM_7"],[0,59,"Backquote",91,"`",192,"VK_OEM_3","`","OEM_3"],[0,60,"Comma",87,",",188,"VK_OEM_COMMA",",","OEM_COMMA"],[0,61,"Period",89,".",190,"VK_OEM_PERIOD",".","OEM_PERIOD"],[0,62,"Slash",90,"/",191,"VK_OEM_2","/","OEM_2"],[1,63,"CapsLock",8,"CapsLock",20,"VK_CAPITAL",e,e],[1,64,"F1",59,"F1",112,"VK_F1",e,e],[1,65,"F2",60,"F2",113,"VK_F2",e,e],[1,66,"F3",61,"F3",114,"VK_F3",e,e],[1,67,"F4",62,"F4",115,"VK_F4",e,e],[1,68,"F5",63,"F5",116,"VK_F5",e,e],[1,69,"F6",64,"F6",117,"VK_F6",e,e],[1,70,"F7",65,"F7",118,"VK_F7",e,e],[1,71,"F8",66,"F8",119,"VK_F8",e,e],[1,72,"F9",67,"F9",120,"VK_F9",e,e],[1,73,"F10",68,"F10",121,"VK_F10",e,e],[1,74,"F11",69,"F11",122,"VK_F11",e,e],[1,75,"F12",70,"F12",123,"VK_F12",e,e],[1,76,"PrintScreen",0,e,0,e,e,e],[1,77,"ScrollLock",84,"ScrollLock",145,"VK_SCROLL",e,e],[1,78,"Pause",7,"PauseBreak",19,"VK_PAUSE",e,e],[1,79,"Insert",19,"Insert",45,"VK_INSERT",e,e],[1,80,"Home",14,"Home",36,"VK_HOME",e,e],[1,81,"PageUp",11,"PageUp",33,"VK_PRIOR",e,e],[1,82,"Delete",20,"Delete",46,"VK_DELETE",e,e],[1,83,"End",13,"End",35,"VK_END",e,e],[1,84,"PageDown",12,"PageDown",34,"VK_NEXT",e,e],[1,85,"ArrowRight",17,"RightArrow",39,"VK_RIGHT","Right",e],[1,86,"ArrowLeft",15,"LeftArrow",37,"VK_LEFT","Left",e],[1,87,"ArrowDown",18,"DownArrow",40,"VK_DOWN","Down",e],[1,88,"ArrowUp",16,"UpArrow",38,"VK_UP","Up",e],[1,89,"NumLock",83,"NumLock",144,"VK_NUMLOCK",e,e],[1,90,"NumpadDivide",113,"NumPad_Divide",111,"VK_DIVIDE",e,e],[1,91,"NumpadMultiply",108,"NumPad_Multiply",106,"VK_MULTIPLY",e,e],[1,92,"NumpadSubtract",111,"NumPad_Subtract",109,"VK_SUBTRACT",e,e],[1,93,"NumpadAdd",109,"NumPad_Add",107,"VK_ADD",e,e],[1,94,"NumpadEnter",3,e,0,e,e,e],[1,95,"Numpad1",99,"NumPad1",97,"VK_NUMPAD1",e,e],[1,96,"Numpad2",100,"NumPad2",98,"VK_NUMPAD2",e,e],[1,97,"Numpad3",101,"NumPad3",99,"VK_NUMPAD3",e,e],[1,98,"Numpad4",102,"NumPad4",100,"VK_NUMPAD4",e,e],[1,99,"Numpad5",103,"NumPad5",101,"VK_NUMPAD5",e,e],[1,100,"Numpad6",104,"NumPad6",102,"VK_NUMPAD6",e,e],[1,101,"Numpad7",105,"NumPad7",103,"VK_NUMPAD7",e,e],[1,102,"Numpad8",106,"NumPad8",104,"VK_NUMPAD8",e,e],[1,103,"Numpad9",107,"NumPad9",105,"VK_NUMPAD9",e,e],[1,104,"Numpad0",98,"NumPad0",96,"VK_NUMPAD0",e,e],[1,105,"NumpadDecimal",112,"NumPad_Decimal",110,"VK_DECIMAL",e,e],[0,106,"IntlBackslash",97,"OEM_102",226,"VK_OEM_102",e,e],[1,107,"ContextMenu",58,"ContextMenu",93,e,e,e],[1,108,"Power",0,e,0,e,e,e],[1,109,"NumpadEqual",0,e,0,e,e,e],[1,110,"F13",71,"F13",124,"VK_F13",e,e],[1,111,"F14",72,"F14",125,"VK_F14",e,e],[1,112,"F15",73,"F15",126,"VK_F15",e,e],[1,113,"F16",74,"F16",127,"VK_F16",e,e],[1,114,"F17",75,"F17",128,"VK_F17",e,e],[1,115,"F18",76,"F18",129,"VK_F18",e,e],[1,116,"F19",77,"F19",130,"VK_F19",e,e],[1,117,"F20",78,"F20",131,"VK_F20",e,e],[1,118,"F21",79,"F21",132,"VK_F21",e,e],[1,119,"F22",80,"F22",133,"VK_F22",e,e],[1,120,"F23",81,"F23",134,"VK_F23",e,e],[1,121,"F24",82,"F24",135,"VK_F24",e,e],[1,122,"Open",0,e,0,e,e,e],[1,123,"Help",0,e,0,e,e,e],[1,124,"Select",0,e,0,e,e,e],[1,125,"Again",0,e,0,e,e,e],[1,126,"Undo",0,e,0,e,e,e],[1,127,"Cut",0,e,0,e,e,e],[1,128,"Copy",0,e,0,e,e,e],[1,129,"Paste",0,e,0,e,e,e],[1,130,"Find",0,e,0,e,e,e],[1,131,"AudioVolumeMute",117,"AudioVolumeMute",173,"VK_VOLUME_MUTE",e,e],[1,132,"AudioVolumeUp",118,"AudioVolumeUp",175,"VK_VOLUME_UP",e,e],[1,133,"AudioVolumeDown",119,"AudioVolumeDown",174,"VK_VOLUME_DOWN",e,e],[1,134,"NumpadComma",110,"NumPad_Separator",108,"VK_SEPARATOR",e,e],[0,135,"IntlRo",115,"ABNT_C1",193,"VK_ABNT_C1",e,e],[1,136,"KanaMode",0,e,0,e,e,e],[0,137,"IntlYen",0,e,0,e,e,e],[1,138,"Convert",0,e,0,e,e,e],[1,139,"NonConvert",0,e,0,e,e,e],[1,140,"Lang1",0,e,0,e,e,e],[1,141,"Lang2",0,e,0,e,e,e],[1,142,"Lang3",0,e,0,e,e,e],[1,143,"Lang4",0,e,0,e,e,e],[1,144,"Lang5",0,e,0,e,e,e],[1,145,"Abort",0,e,0,e,e,e],[1,146,"Props",0,e,0,e,e,e],[1,147,"NumpadParenLeft",0,e,0,e,e,e],[1,148,"NumpadParenRight",0,e,0,e,e,e],[1,149,"NumpadBackspace",0,e,0,e,e,e],[1,150,"NumpadMemoryStore",0,e,0,e,e,e],[1,151,"NumpadMemoryRecall",0,e,0,e,e,e],[1,152,"NumpadMemoryClear",0,e,0,e,e,e],[1,153,"NumpadMemoryAdd",0,e,0,e,e,e],[1,154,"NumpadMemorySubtract",0,e,0,e,e,e],[1,155,"NumpadClear",131,"Clear",12,"VK_CLEAR",e,e],[1,156,"NumpadClearEntry",0,e,0,e,e,e],[1,0,e,5,"Ctrl",17,"VK_CONTROL",e,e],[1,0,e,4,"Shift",16,"VK_SHIFT",e,e],[1,0,e,6,"Alt",18,"VK_MENU",e,e],[1,0,e,57,"Meta",91,"VK_COMMAND",e,e],[1,157,"ControlLeft",5,e,0,"VK_LCONTROL",e,e],[1,158,"ShiftLeft",4,e,0,"VK_LSHIFT",e,e],[1,159,"AltLeft",6,e,0,"VK_LMENU",e,e],[1,160,"MetaLeft",57,e,0,"VK_LWIN",e,e],[1,161,"ControlRight",5,e,0,"VK_RCONTROL",e,e],[1,162,"ShiftRight",4,e,0,"VK_RSHIFT",e,e],[1,163,"AltRight",6,e,0,"VK_RMENU",e,e],[1,164,"MetaRight",57,e,0,"VK_RWIN",e,e],[1,165,"BrightnessUp",0,e,0,e,e,e],[1,166,"BrightnessDown",0,e,0,e,e,e],[1,167,"MediaPlay",0,e,0,e,e,e],[1,168,"MediaRecord",0,e,0,e,e,e],[1,169,"MediaFastForward",0,e,0,e,e,e],[1,170,"MediaRewind",0,e,0,e,e,e],[1,171,"MediaTrackNext",124,"MediaTrackNext",176,"VK_MEDIA_NEXT_TRACK",e,e],[1,172,"MediaTrackPrevious",125,"MediaTrackPrevious",177,"VK_MEDIA_PREV_TRACK",e,e],[1,173,"MediaStop",126,"MediaStop",178,"VK_MEDIA_STOP",e,e],[1,174,"Eject",0,e,0,e,e,e],[1,175,"MediaPlayPause",127,"MediaPlayPause",179,"VK_MEDIA_PLAY_PAUSE",e,e],[1,176,"MediaSelect",128,"LaunchMediaPlayer",181,"VK_MEDIA_LAUNCH_MEDIA_SELECT",e,e],[1,177,"LaunchMail",129,"LaunchMail",180,"VK_MEDIA_LAUNCH_MAIL",e,e],[1,178,"LaunchApp2",130,"LaunchApp2",183,"VK_MEDIA_LAUNCH_APP2",e,e],[1,179,"LaunchApp1",0,e,0,"VK_MEDIA_LAUNCH_APP1",e,e],[1,180,"SelectTask",0,e,0,e,e,e],[1,181,"LaunchScreenSaver",0,e,0,e,e,e],[1,182,"BrowserSearch",120,"BrowserSearch",170,"VK_BROWSER_SEARCH",e,e],[1,183,"BrowserHome",121,"BrowserHome",172,"VK_BROWSER_HOME",e,e],[1,184,"BrowserBack",122,"BrowserBack",166,"VK_BROWSER_BACK",e,e],[1,185,"BrowserForward",123,"BrowserForward",167,"VK_BROWSER_FORWARD",e,e],[1,186,"BrowserStop",0,e,0,"VK_BROWSER_STOP",e,e],[1,187,"BrowserRefresh",0,e,0,"VK_BROWSER_REFRESH",e,e],[1,188,"BrowserFavorites",0,e,0,"VK_BROWSER_FAVORITES",e,e],[1,189,"ZoomToggle",0,e,0,e,e,e],[1,190,"MailReply",0,e,0,e,e,e],[1,191,"MailForward",0,e,0,e,e,e],[1,192,"MailSend",0,e,0,e,e,e],[1,0,e,114,"KeyInComposition",229,e,e,e],[1,0,e,116,"ABNT_C2",194,"VK_ABNT_C2",e,e],[1,0,e,96,"OEM_8",223,"VK_OEM_8",e,e],[1,0,e,0,e,0,"VK_KANA",e,e],[1,0,e,0,e,0,"VK_HANGUL",e,e],[1,0,e,0,e,0,"VK_JUNJA",e,e],[1,0,e,0,e,0,"VK_FINAL",e,e],[1,0,e,0,e,0,"VK_HANJA",e,e],[1,0,e,0,e,0,"VK_KANJI",e,e],[1,0,e,0,e,0,"VK_CONVERT",e,e],[1,0,e,0,e,0,"VK_NONCONVERT",e,e],[1,0,e,0,e,0,"VK_ACCEPT",e,e],[1,0,e,0,e,0,"VK_MODECHANGE",e,e],[1,0,e,0,e,0,"VK_SELECT",e,e],[1,0,e,0,e,0,"VK_PRINT",e,e],[1,0,e,0,e,0,"VK_EXECUTE",e,e],[1,0,e,0,e,0,"VK_SNAPSHOT",e,e],[1,0,e,0,e,0,"VK_HELP",e,e],[1,0,e,0,e,0,"VK_APPS",e,e],[1,0,e,0,e,0,"VK_PROCESSKEY",e,e],[1,0,e,0,e,0,"VK_PACKET",e,e],[1,0,e,0,e,0,"VK_DBE_SBCSCHAR",e,e],[1,0,e,0,e,0,"VK_DBE_DBCSCHAR",e,e],[1,0,e,0,e,0,"VK_ATTN",e,e],[1,0,e,0,e,0,"VK_CRSEL",e,e],[1,0,e,0,e,0,"VK_EXSEL",e,e],[1,0,e,0,e,0,"VK_EREOF",e,e],[1,0,e,0,e,0,"VK_PLAY",e,e],[1,0,e,0,e,0,"VK_ZOOM",e,e],[1,0,e,0,e,0,"VK_NONAME",e,e],[1,0,e,0,e,0,"VK_PA1",e,e],[1,0,e,0,e,0,"VK_OEM_CLEAR",e,e]],n=[],i=[];for(const e of t){const[t,r,s,p,_,b,k,C,v]=e;if(i[r]||(i[r]=!0,c[r]=s,d[s]=r,g[s.toLowerCase()]=r,t&&(f[r]=p,0!==p&&3!==p&&5!==p&&4!==p&&6!==p&&57!==p&&(m[p]=r))),!n[p]){if(n[p]=!0,!_)throw new Error(`String representation missing for key code ${p} around scan code ${s}`);o.define(p,_),a.define(p,C||_),l.define(p,v||C||_)}b&&(h[b]=p),k&&(u[k]=p)}m[3]=46}(),function(e){e.toString=function(e){return o.keyCodeToStr(e)},e.fromString=function(e){return o.strToKeyCode(e)},e.toUserSettingsUS=function(e){return a.keyCodeToStr(e)},e.toUserSettingsGeneral=function(e){return l.keyCodeToStr(e)},e.fromUserSettings=function(e){return a.strToKeyCode(e)||l.strToKeyCode(e)},e.toElectronAccelerator=function(e){if(e>=98&&e<=113)return null;switch(e){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return o.keyCodeToStr(e)}}(p||(p={}));var _,b,k,C,v,L,w,y,S,x,E,N,I,T,A,R,M,D,O,B,F,P,z,V,q,W,H,U,K,j,$,G,Q,Y,X,Z,J,ee,te,ne,ie,re,se,oe,ae,le,he=n(7264),ue=n(5365),ce=n(8061),de=n(3702),ge=n(4364);!function(e){e[e.Unknown=0]="Unknown",e[e.Disabled=1]="Disabled",e[e.Enabled=2]="Enabled"}(_||(_={})),function(e){e[e.Invoke=1]="Invoke",e[e.Auto=2]="Auto"}(b||(b={})),function(e){e[e.None=0]="None",e[e.KeepWhitespace=1]="KeepWhitespace",e[e.InsertAsSnippet=4]="InsertAsSnippet"}(k||(k={})),function(e){e[e.Method=0]="Method",e[e.Function=1]="Function",e[e.Constructor=2]="Constructor",e[e.Field=3]="Field",e[e.Variable=4]="Variable",e[e.Class=5]="Class",e[e.Struct=6]="Struct",e[e.Interface=7]="Interface",e[e.Module=8]="Module",e[e.Property=9]="Property",e[e.Event=10]="Event",e[e.Operator=11]="Operator",e[e.Unit=12]="Unit",e[e.Value=13]="Value",e[e.Constant=14]="Constant",e[e.Enum=15]="Enum",e[e.EnumMember=16]="EnumMember",e[e.Keyword=17]="Keyword",e[e.Text=18]="Text",e[e.Color=19]="Color",e[e.File=20]="File",e[e.Reference=21]="Reference",e[e.Customcolor=22]="Customcolor",e[e.Folder=23]="Folder",e[e.TypeParameter=24]="TypeParameter",e[e.User=25]="User",e[e.Issue=26]="Issue",e[e.Snippet=27]="Snippet"}(C||(C={})),function(e){e[e.Deprecated=1]="Deprecated"}(v||(v={})),function(e){e[e.Invoke=0]="Invoke",e[e.TriggerCharacter=1]="TriggerCharacter",e[e.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"}(L||(L={})),function(e){e[e.EXACT=0]="EXACT",e[e.ABOVE=1]="ABOVE",e[e.BELOW=2]="BELOW"}(w||(w={})),function(e){e[e.NotSet=0]="NotSet",e[e.ContentFlush=1]="ContentFlush",e[e.RecoverFromMarkers=2]="RecoverFromMarkers",e[e.Explicit=3]="Explicit",e[e.Paste=4]="Paste",e[e.Undo=5]="Undo",e[e.Redo=6]="Redo"}(y||(y={})),function(e){e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"}(S||(S={})),function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"}(x||(x={})),function(e){e[e.None=0]="None",e[e.Keep=1]="Keep",e[e.Brackets=2]="Brackets",e[e.Advanced=3]="Advanced",e[e.Full=4]="Full"}(E||(E={})),function(e){e[e.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",e[e.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",e[e.accessibilitySupport=2]="accessibilitySupport",e[e.accessibilityPageSize=3]="accessibilityPageSize",e[e.ariaLabel=4]="ariaLabel",e[e.ariaRequired=5]="ariaRequired",e[e.autoClosingBrackets=6]="autoClosingBrackets",e[e.autoClosingComments=7]="autoClosingComments",e[e.screenReaderAnnounceInlineSuggestion=8]="screenReaderAnnounceInlineSuggestion",e[e.autoClosingDelete=9]="autoClosingDelete",e[e.autoClosingOvertype=10]="autoClosingOvertype",e[e.autoClosingQuotes=11]="autoClosingQuotes",e[e.autoIndent=12]="autoIndent",e[e.automaticLayout=13]="automaticLayout",e[e.autoSurround=14]="autoSurround",e[e.bracketPairColorization=15]="bracketPairColorization",e[e.guides=16]="guides",e[e.codeLens=17]="codeLens",e[e.codeLensFontFamily=18]="codeLensFontFamily",e[e.codeLensFontSize=19]="codeLensFontSize",e[e.colorDecorators=20]="colorDecorators",e[e.colorDecoratorsLimit=21]="colorDecoratorsLimit",e[e.columnSelection=22]="columnSelection",e[e.comments=23]="comments",e[e.contextmenu=24]="contextmenu",e[e.copyWithSyntaxHighlighting=25]="copyWithSyntaxHighlighting",e[e.cursorBlinking=26]="cursorBlinking",e[e.cursorSmoothCaretAnimation=27]="cursorSmoothCaretAnimation",e[e.cursorStyle=28]="cursorStyle",e[e.cursorSurroundingLines=29]="cursorSurroundingLines",e[e.cursorSurroundingLinesStyle=30]="cursorSurroundingLinesStyle",e[e.cursorWidth=31]="cursorWidth",e[e.disableLayerHinting=32]="disableLayerHinting",e[e.disableMonospaceOptimizations=33]="disableMonospaceOptimizations",e[e.domReadOnly=34]="domReadOnly",e[e.dragAndDrop=35]="dragAndDrop",e[e.dropIntoEditor=36]="dropIntoEditor",e[e.emptySelectionClipboard=37]="emptySelectionClipboard",e[e.experimentalWhitespaceRendering=38]="experimentalWhitespaceRendering",e[e.extraEditorClassName=39]="extraEditorClassName",e[e.fastScrollSensitivity=40]="fastScrollSensitivity",e[e.find=41]="find",e[e.fixedOverflowWidgets=42]="fixedOverflowWidgets",e[e.folding=43]="folding",e[e.foldingStrategy=44]="foldingStrategy",e[e.foldingHighlight=45]="foldingHighlight",e[e.foldingImportsByDefault=46]="foldingImportsByDefault",e[e.foldingMaximumRegions=47]="foldingMaximumRegions",e[e.unfoldOnClickAfterEndOfLine=48]="unfoldOnClickAfterEndOfLine",e[e.fontFamily=49]="fontFamily",e[e.fontInfo=50]="fontInfo",e[e.fontLigatures=51]="fontLigatures",e[e.fontSize=52]="fontSize",e[e.fontWeight=53]="fontWeight",e[e.fontVariations=54]="fontVariations",e[e.formatOnPaste=55]="formatOnPaste",e[e.formatOnType=56]="formatOnType",e[e.glyphMargin=57]="glyphMargin",e[e.gotoLocation=58]="gotoLocation",e[e.hideCursorInOverviewRuler=59]="hideCursorInOverviewRuler",e[e.hover=60]="hover",e[e.inDiffEditor=61]="inDiffEditor",e[e.inlineSuggest=62]="inlineSuggest",e[e.inlineEdit=63]="inlineEdit",e[e.letterSpacing=64]="letterSpacing",e[e.lightbulb=65]="lightbulb",e[e.lineDecorationsWidth=66]="lineDecorationsWidth",e[e.lineHeight=67]="lineHeight",e[e.lineNumbers=68]="lineNumbers",e[e.lineNumbersMinChars=69]="lineNumbersMinChars",e[e.linkedEditing=70]="linkedEditing",e[e.links=71]="links",e[e.matchBrackets=72]="matchBrackets",e[e.minimap=73]="minimap",e[e.mouseStyle=74]="mouseStyle",e[e.mouseWheelScrollSensitivity=75]="mouseWheelScrollSensitivity",e[e.mouseWheelZoom=76]="mouseWheelZoom",e[e.multiCursorMergeOverlapping=77]="multiCursorMergeOverlapping",e[e.multiCursorModifier=78]="multiCursorModifier",e[e.multiCursorPaste=79]="multiCursorPaste",e[e.multiCursorLimit=80]="multiCursorLimit",e[e.occurrencesHighlight=81]="occurrencesHighlight",e[e.overviewRulerBorder=82]="overviewRulerBorder",e[e.overviewRulerLanes=83]="overviewRulerLanes",e[e.padding=84]="padding",e[e.pasteAs=85]="pasteAs",e[e.parameterHints=86]="parameterHints",e[e.peekWidgetDefaultFocus=87]="peekWidgetDefaultFocus",e[e.placeholder=88]="placeholder",e[e.definitionLinkOpensInPeek=89]="definitionLinkOpensInPeek",e[e.quickSuggestions=90]="quickSuggestions",e[e.quickSuggestionsDelay=91]="quickSuggestionsDelay",e[e.readOnly=92]="readOnly",e[e.readOnlyMessage=93]="readOnlyMessage",e[e.renameOnType=94]="renameOnType",e[e.renderControlCharacters=95]="renderControlCharacters",e[e.renderFinalNewline=96]="renderFinalNewline",e[e.renderLineHighlight=97]="renderLineHighlight",e[e.renderLineHighlightOnlyWhenFocus=98]="renderLineHighlightOnlyWhenFocus",e[e.renderValidationDecorations=99]="renderValidationDecorations",e[e.renderWhitespace=100]="renderWhitespace",e[e.revealHorizontalRightPadding=101]="revealHorizontalRightPadding",e[e.roundedSelection=102]="roundedSelection",e[e.rulers=103]="rulers",e[e.scrollbar=104]="scrollbar",e[e.scrollBeyondLastColumn=105]="scrollBeyondLastColumn",e[e.scrollBeyondLastLine=106]="scrollBeyondLastLine",e[e.scrollPredominantAxis=107]="scrollPredominantAxis",e[e.selectionClipboard=108]="selectionClipboard",e[e.selectionHighlight=109]="selectionHighlight",e[e.selectOnLineNumbers=110]="selectOnLineNumbers",e[e.showFoldingControls=111]="showFoldingControls",e[e.showUnused=112]="showUnused",e[e.snippetSuggestions=113]="snippetSuggestions",e[e.smartSelect=114]="smartSelect",e[e.smoothScrolling=115]="smoothScrolling",e[e.stickyScroll=116]="stickyScroll",e[e.stickyTabStops=117]="stickyTabStops",e[e.stopRenderingLineAfter=118]="stopRenderingLineAfter",e[e.suggest=119]="suggest",e[e.suggestFontSize=120]="suggestFontSize",e[e.suggestLineHeight=121]="suggestLineHeight",e[e.suggestOnTriggerCharacters=122]="suggestOnTriggerCharacters",e[e.suggestSelection=123]="suggestSelection",e[e.tabCompletion=124]="tabCompletion",e[e.tabIndex=125]="tabIndex",e[e.unicodeHighlighting=126]="unicodeHighlighting",e[e.unusualLineTerminators=127]="unusualLineTerminators",e[e.useShadowDOM=128]="useShadowDOM",e[e.useTabStops=129]="useTabStops",e[e.wordBreak=130]="wordBreak",e[e.wordSegmenterLocales=131]="wordSegmenterLocales",e[e.wordSeparators=132]="wordSeparators",e[e.wordWrap=133]="wordWrap",e[e.wordWrapBreakAfterCharacters=134]="wordWrapBreakAfterCharacters",e[e.wordWrapBreakBeforeCharacters=135]="wordWrapBreakBeforeCharacters",e[e.wordWrapColumn=136]="wordWrapColumn",e[e.wordWrapOverride1=137]="wordWrapOverride1",e[e.wordWrapOverride2=138]="wordWrapOverride2",e[e.wrappingIndent=139]="wrappingIndent",e[e.wrappingStrategy=140]="wrappingStrategy",e[e.showDeprecated=141]="showDeprecated",e[e.inlayHints=142]="inlayHints",e[e.editorClassName=143]="editorClassName",e[e.pixelRatio=144]="pixelRatio",e[e.tabFocusMode=145]="tabFocusMode",e[e.layoutInfo=146]="layoutInfo",e[e.wrappingInfo=147]="wrappingInfo",e[e.defaultColorDecorators=148]="defaultColorDecorators",e[e.colorDecoratorsActivatedOn=149]="colorDecoratorsActivatedOn",e[e.inlineCompletionsAccessibilityVerbose=150]="inlineCompletionsAccessibilityVerbose"}(N||(N={})),function(e){e[e.TextDefined=0]="TextDefined",e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"}(I||(I={})),function(e){e[e.LF=0]="LF",e[e.CRLF=1]="CRLF"}(T||(T={})),function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=3]="Right"}(A||(A={})),function(e){e[e.Increase=0]="Increase",e[e.Decrease=1]="Decrease"}(R||(R={})),function(e){e[e.None=0]="None",e[e.Indent=1]="Indent",e[e.IndentOutdent=2]="IndentOutdent",e[e.Outdent=3]="Outdent"}(M||(M={})),function(e){e[e.Both=0]="Both",e[e.Right=1]="Right",e[e.Left=2]="Left",e[e.None=3]="None"}(D||(D={})),function(e){e[e.Type=1]="Type",e[e.Parameter=2]="Parameter"}(O||(O={})),function(e){e[e.Automatic=0]="Automatic",e[e.Explicit=1]="Explicit"}(B||(B={})),function(e){e[e.Invoke=0]="Invoke",e[e.Automatic=1]="Automatic"}(F||(F={})),function(e){e[e.DependsOnKbLayout=-1]="DependsOnKbLayout",e[e.Unknown=0]="Unknown",e[e.Backspace=1]="Backspace",e[e.Tab=2]="Tab",e[e.Enter=3]="Enter",e[e.Shift=4]="Shift",e[e.Ctrl=5]="Ctrl",e[e.Alt=6]="Alt",e[e.PauseBreak=7]="PauseBreak",e[e.CapsLock=8]="CapsLock",e[e.Escape=9]="Escape",e[e.Space=10]="Space",e[e.PageUp=11]="PageUp",e[e.PageDown=12]="PageDown",e[e.End=13]="End",e[e.Home=14]="Home",e[e.LeftArrow=15]="LeftArrow",e[e.UpArrow=16]="UpArrow",e[e.RightArrow=17]="RightArrow",e[e.DownArrow=18]="DownArrow",e[e.Insert=19]="Insert",e[e.Delete=20]="Delete",e[e.Digit0=21]="Digit0",e[e.Digit1=22]="Digit1",e[e.Digit2=23]="Digit2",e[e.Digit3=24]="Digit3",e[e.Digit4=25]="Digit4",e[e.Digit5=26]="Digit5",e[e.Digit6=27]="Digit6",e[e.Digit7=28]="Digit7",e[e.Digit8=29]="Digit8",e[e.Digit9=30]="Digit9",e[e.KeyA=31]="KeyA",e[e.KeyB=32]="KeyB",e[e.KeyC=33]="KeyC",e[e.KeyD=34]="KeyD",e[e.KeyE=35]="KeyE",e[e.KeyF=36]="KeyF",e[e.KeyG=37]="KeyG",e[e.KeyH=38]="KeyH",e[e.KeyI=39]="KeyI",e[e.KeyJ=40]="KeyJ",e[e.KeyK=41]="KeyK",e[e.KeyL=42]="KeyL",e[e.KeyM=43]="KeyM",e[e.KeyN=44]="KeyN",e[e.KeyO=45]="KeyO",e[e.KeyP=46]="KeyP",e[e.KeyQ=47]="KeyQ",e[e.KeyR=48]="KeyR",e[e.KeyS=49]="KeyS",e[e.KeyT=50]="KeyT",e[e.KeyU=51]="KeyU",e[e.KeyV=52]="KeyV",e[e.KeyW=53]="KeyW",e[e.KeyX=54]="KeyX",e[e.KeyY=55]="KeyY",e[e.KeyZ=56]="KeyZ",e[e.Meta=57]="Meta",e[e.ContextMenu=58]="ContextMenu",e[e.F1=59]="F1",e[e.F2=60]="F2",e[e.F3=61]="F3",e[e.F4=62]="F4",e[e.F5=63]="F5",e[e.F6=64]="F6",e[e.F7=65]="F7",e[e.F8=66]="F8",e[e.F9=67]="F9",e[e.F10=68]="F10",e[e.F11=69]="F11",e[e.F12=70]="F12",e[e.F13=71]="F13",e[e.F14=72]="F14",e[e.F15=73]="F15",e[e.F16=74]="F16",e[e.F17=75]="F17",e[e.F18=76]="F18",e[e.F19=77]="F19",e[e.F20=78]="F20",e[e.F21=79]="F21",e[e.F22=80]="F22",e[e.F23=81]="F23",e[e.F24=82]="F24",e[e.NumLock=83]="NumLock",e[e.ScrollLock=84]="ScrollLock",e[e.Semicolon=85]="Semicolon",e[e.Equal=86]="Equal",e[e.Comma=87]="Comma",e[e.Minus=88]="Minus",e[e.Period=89]="Period",e[e.Slash=90]="Slash",e[e.Backquote=91]="Backquote",e[e.BracketLeft=92]="BracketLeft",e[e.Backslash=93]="Backslash",e[e.BracketRight=94]="BracketRight",e[e.Quote=95]="Quote",e[e.OEM_8=96]="OEM_8",e[e.IntlBackslash=97]="IntlBackslash",e[e.Numpad0=98]="Numpad0",e[e.Numpad1=99]="Numpad1",e[e.Numpad2=100]="Numpad2",e[e.Numpad3=101]="Numpad3",e[e.Numpad4=102]="Numpad4",e[e.Numpad5=103]="Numpad5",e[e.Numpad6=104]="Numpad6",e[e.Numpad7=105]="Numpad7",e[e.Numpad8=106]="Numpad8",e[e.Numpad9=107]="Numpad9",e[e.NumpadMultiply=108]="NumpadMultiply",e[e.NumpadAdd=109]="NumpadAdd",e[e.NUMPAD_SEPARATOR=110]="NUMPAD_SEPARATOR",e[e.NumpadSubtract=111]="NumpadSubtract",e[e.NumpadDecimal=112]="NumpadDecimal",e[e.NumpadDivide=113]="NumpadDivide",e[e.KEY_IN_COMPOSITION=114]="KEY_IN_COMPOSITION",e[e.ABNT_C1=115]="ABNT_C1",e[e.ABNT_C2=116]="ABNT_C2",e[e.AudioVolumeMute=117]="AudioVolumeMute",e[e.AudioVolumeUp=118]="AudioVolumeUp",e[e.AudioVolumeDown=119]="AudioVolumeDown",e[e.BrowserSearch=120]="BrowserSearch",e[e.BrowserHome=121]="BrowserHome",e[e.BrowserBack=122]="BrowserBack",e[e.BrowserForward=123]="BrowserForward",e[e.MediaTrackNext=124]="MediaTrackNext",e[e.MediaTrackPrevious=125]="MediaTrackPrevious",e[e.MediaStop=126]="MediaStop",e[e.MediaPlayPause=127]="MediaPlayPause",e[e.LaunchMediaPlayer=128]="LaunchMediaPlayer",e[e.LaunchMail=129]="LaunchMail",e[e.LaunchApp2=130]="LaunchApp2",e[e.Clear=131]="Clear",e[e.MAX_VALUE=132]="MAX_VALUE"}(P||(P={})),function(e){e[e.Hint=1]="Hint",e[e.Info=2]="Info",e[e.Warning=4]="Warning",e[e.Error=8]="Error"}(z||(z={})),function(e){e[e.Unnecessary=1]="Unnecessary",e[e.Deprecated=2]="Deprecated"}(V||(V={})),function(e){e[e.Inline=1]="Inline",e[e.Gutter=2]="Gutter"}(q||(q={})),function(e){e[e.Normal=1]="Normal",e[e.Underlined=2]="Underlined"}(W||(W={})),function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.TEXTAREA=1]="TEXTAREA",e[e.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",e[e.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",e[e.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",e[e.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",e[e.CONTENT_TEXT=6]="CONTENT_TEXT",e[e.CONTENT_EMPTY=7]="CONTENT_EMPTY",e[e.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",e[e.CONTENT_WIDGET=9]="CONTENT_WIDGET",e[e.OVERVIEW_RULER=10]="OVERVIEW_RULER",e[e.SCROLLBAR=11]="SCROLLBAR",e[e.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",e[e.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"}(H||(H={})),function(e){e[e.AIGenerated=1]="AIGenerated"}(U||(U={})),function(e){e[e.Invoke=0]="Invoke",e[e.Automatic=1]="Automatic"}(K||(K={})),function(e){e[e.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",e[e.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",e[e.TOP_CENTER=2]="TOP_CENTER"}(j||(j={})),function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"}($||($={})),function(e){e[e.Word=0]="Word",e[e.Line=1]="Line",e[e.Suggest=2]="Suggest"}(G||(G={})),function(e){e[e.Left=0]="Left",e[e.Right=1]="Right",e[e.None=2]="None",e[e.LeftOfInjectedText=3]="LeftOfInjectedText",e[e.RightOfInjectedText=4]="RightOfInjectedText"}(Q||(Q={})),function(e){e[e.Off=0]="Off",e[e.On=1]="On",e[e.Relative=2]="Relative",e[e.Interval=3]="Interval",e[e.Custom=4]="Custom"}(Y||(Y={})),function(e){e[e.None=0]="None",e[e.Text=1]="Text",e[e.Blocks=2]="Blocks"}(X||(X={})),function(e){e[e.Smooth=0]="Smooth",e[e.Immediate=1]="Immediate"}(Z||(Z={})),function(e){e[e.Auto=1]="Auto",e[e.Hidden=2]="Hidden",e[e.Visible=3]="Visible"}(J||(J={})),function(e){e[e.LTR=0]="LTR",e[e.RTL=1]="RTL"}(ee||(ee={})),function(e){e.Off="off",e.OnCode="onCode",e.On="on"}(te||(te={})),function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"}(ne||(ne={})),function(e){e[e.File=0]="File",e[e.Module=1]="Module",e[e.Namespace=2]="Namespace",e[e.Package=3]="Package",e[e.Class=4]="Class",e[e.Method=5]="Method",e[e.Property=6]="Property",e[e.Field=7]="Field",e[e.Constructor=8]="Constructor",e[e.Enum=9]="Enum",e[e.Interface=10]="Interface",e[e.Function=11]="Function",e[e.Variable=12]="Variable",e[e.Constant=13]="Constant",e[e.String=14]="String",e[e.Number=15]="Number",e[e.Boolean=16]="Boolean",e[e.Array=17]="Array",e[e.Object=18]="Object",e[e.Key=19]="Key",e[e.Null=20]="Null",e[e.EnumMember=21]="EnumMember",e[e.Struct=22]="Struct",e[e.Event=23]="Event",e[e.Operator=24]="Operator",e[e.TypeParameter=25]="TypeParameter"}(ie||(ie={})),function(e){e[e.Deprecated=1]="Deprecated"}(re||(re={})),function(e){e[e.Hidden=0]="Hidden",e[e.Blink=1]="Blink",e[e.Smooth=2]="Smooth",e[e.Phase=3]="Phase",e[e.Expand=4]="Expand",e[e.Solid=5]="Solid"}(se||(se={})),function(e){e[e.Line=1]="Line",e[e.Block=2]="Block",e[e.Underline=3]="Underline",e[e.LineThin=4]="LineThin",e[e.BlockOutline=5]="BlockOutline",e[e.UnderlineThin=6]="UnderlineThin"}(oe||(oe={})),function(e){e[e.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",e[e.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",e[e.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",e[e.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"}(ae||(ae={})),function(e){e[e.None=0]="None",e[e.Same=1]="Same",e[e.Indent=2]="Indent",e[e.DeepIndent=3]="DeepIndent"}(le||(le={}));class fe{static{this.CtrlCmd=2048}static{this.Shift=1024}static{this.Alt=512}static{this.WinCtrl=256}static chord(e,t){return function(e,t){return(e|(65535&t)<<16>>>0)>>>0}(e,t)}}function me(){return{editor:void 0,languages:void 0,CancellationTokenSource:i.Qi,Emitter:r.vl,KeyCode:P,KeyMod:fe,Position:ue.y,Range:ce.Q,Selection:de.L,SelectionDirection:ee,MarkerSeverity:z,MarkerTag:V,Uri:he.r,Token:ge.ou}}},7798:(e,t,n)=>{"use strict";n.r(t),n.d(t,{BaseEditorSimpleWorker:()=>De,EditorSimpleWorker:()=>Oe,create:()=>Be});class i{constructor(e,t,n,i){this.originalStart=e,this.originalLength=t,this.modifiedStart=n,this.modifiedLength=i}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}var r=n(2344);class s{constructor(e){this.source=e}getElements(){const e=this.source,t=new Int32Array(e.length);for(let n=0,i=e.length;n<i;n++)t[n]=e.charCodeAt(n);return t}}function o(e,t,n){return new u(new s(e),new s(t)).ComputeDiff(n).changes}class a{static Assert(e,t){if(!e)throw new Error(t)}}class l{static Copy(e,t,n,i,r){for(let s=0;s<r;s++)n[i+s]=e[t+s]}static Copy2(e,t,n,i,r){for(let s=0;s<r;s++)n[i+s]=e[t+s]}}class h{constructor(){this.m_changes=[],this.m_originalStart=1073741824,this.m_modifiedStart=1073741824,this.m_originalCount=0,this.m_modifiedCount=0}MarkNextChange(){(this.m_originalCount>0||this.m_modifiedCount>0)&&this.m_changes.push(new i(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_originalCount++}AddModifiedElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}}class u{constructor(e,t,n=null){this.ContinueProcessingPredicate=n,this._originalSequence=e,this._modifiedSequence=t;const[i,r,s]=u._getElements(e),[o,a,l]=u._getElements(t);this._hasStrings=s&&l,this._originalStringElements=i,this._originalElementsOrHash=r,this._modifiedStringElements=o,this._modifiedElementsOrHash=a,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(e){return e.length>0&&"string"==typeof e[0]}static _getElements(e){const t=e.getElements();if(u._isStringArray(t)){const e=new Int32Array(t.length);for(let n=0,i=t.length;n<i;n++)e[n]=(0,r.e2)(t[n],0);return[t,e,!0]}return t instanceof Int32Array?[[],t,!1]:[[],new Int32Array(t),!1]}ElementsAreEqual(e,t){return this._originalElementsOrHash[e]===this._modifiedElementsOrHash[t]&&(!this._hasStrings||this._originalStringElements[e]===this._modifiedStringElements[t])}ElementsAreStrictEqual(e,t){return!!this.ElementsAreEqual(e,t)&&u._getStrictElement(this._originalSequence,e)===u._getStrictElement(this._modifiedSequence,t)}static _getStrictElement(e,t){return"function"==typeof e.getStrictElement?e.getStrictElement(t):null}OriginalElementsAreEqual(e,t){return this._originalElementsOrHash[e]===this._originalElementsOrHash[t]&&(!this._hasStrings||this._originalStringElements[e]===this._originalStringElements[t])}ModifiedElementsAreEqual(e,t){return this._modifiedElementsOrHash[e]===this._modifiedElementsOrHash[t]&&(!this._hasStrings||this._modifiedStringElements[e]===this._modifiedStringElements[t])}ComputeDiff(e){return this._ComputeDiff(0,this._originalElementsOrHash.length-1,0,this._modifiedElementsOrHash.length-1,e)}_ComputeDiff(e,t,n,i,r){const s=[!1];let o=this.ComputeDiffRecursive(e,t,n,i,s);return r&&(o=this.PrettifyChanges(o)),{quitEarly:s[0],changes:o}}ComputeDiffRecursive(e,t,n,r,s){for(s[0]=!1;e<=t&&n<=r&&this.ElementsAreEqual(e,n);)e++,n++;for(;t>=e&&r>=n&&this.ElementsAreEqual(t,r);)t--,r--;if(e>t||n>r){let s;return n<=r?(a.Assert(e===t+1,"originalStart should only be one more than originalEnd"),s=[new i(e,0,n,r-n+1)]):e<=t?(a.Assert(n===r+1,"modifiedStart should only be one more than modifiedEnd"),s=[new i(e,t-e+1,n,0)]):(a.Assert(e===t+1,"originalStart should only be one more than originalEnd"),a.Assert(n===r+1,"modifiedStart should only be one more than modifiedEnd"),s=[]),s}const o=[0],l=[0],h=this.ComputeRecursionPoint(e,t,n,r,o,l,s),u=o[0],c=l[0];if(null!==h)return h;if(!s[0]){const o=this.ComputeDiffRecursive(e,u,n,c,s);let a=[];return a=s[0]?[new i(u+1,t-(u+1)+1,c+1,r-(c+1)+1)]:this.ComputeDiffRecursive(u+1,t,c+1,r,s),this.ConcatenateChanges(o,a)}return[new i(e,t-e+1,n,r-n+1)]}WALKTRACE(e,t,n,r,s,o,a,l,u,c,d,g,f,m,p,_,b,k){let C=null,v=null,L=new h,w=t,y=n,S=f[0]-_[0]-r,x=-1073741824,E=this.m_forwardHistory.length-1;do{const t=S+e;t===w||t<y&&u[t-1]<u[t+1]?(m=(d=u[t+1])-S-r,d<x&&L.MarkNextChange(),x=d,L.AddModifiedElement(d+1,m),S=t+1-e):(m=(d=u[t-1]+1)-S-r,d<x&&L.MarkNextChange(),x=d-1,L.AddOriginalElement(d,m+1),S=t-1-e),E>=0&&(e=(u=this.m_forwardHistory[E])[0],w=1,y=u.length-1)}while(--E>=-1);if(C=L.getReverseChanges(),k[0]){let e=f[0]+1,t=_[0]+1;if(null!==C&&C.length>0){const n=C[C.length-1];e=Math.max(e,n.getOriginalEnd()),t=Math.max(t,n.getModifiedEnd())}v=[new i(e,g-e+1,t,p-t+1)]}else{L=new h,w=o,y=a,S=f[0]-_[0]-l,x=1073741824,E=b?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const e=S+s;e===w||e<y&&c[e-1]>=c[e+1]?(m=(d=c[e+1]-1)-S-l,d>x&&L.MarkNextChange(),x=d+1,L.AddOriginalElement(d+1,m+1),S=e+1-s):(m=(d=c[e-1])-S-l,d>x&&L.MarkNextChange(),x=d,L.AddModifiedElement(d+1,m+1),S=e-1-s),E>=0&&(s=(c=this.m_reverseHistory[E])[0],w=1,y=c.length-1)}while(--E>=-1);v=L.getChanges()}return this.ConcatenateChanges(C,v)}ComputeRecursionPoint(e,t,n,r,s,o,a){let h=0,u=0,c=0,d=0,g=0,f=0;e--,n--,s[0]=0,o[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const m=t-e+(r-n),p=m+1,_=new Int32Array(p),b=new Int32Array(p),k=r-n,C=t-e,v=e-n,L=t-r,w=(C-k)%2==0;_[k]=e,b[C]=t,a[0]=!1;for(let y=1;y<=m/2+1;y++){let m=0,S=0;c=this.ClipDiagonalBound(k-y,y,k,p),d=this.ClipDiagonalBound(k+y,y,k,p);for(let e=c;e<=d;e+=2){h=e===c||e<d&&_[e-1]<_[e+1]?_[e+1]:_[e-1]+1,u=h-(e-k)-v;const n=h;for(;h<t&&u<r&&this.ElementsAreEqual(h+1,u+1);)h++,u++;if(_[e]=h,h+u>m+S&&(m=h,S=u),!w&&Math.abs(e-C)<=y-1&&h>=b[e])return s[0]=h,o[0]=u,n<=b[e]&&y<=1448?this.WALKTRACE(k,c,d,v,C,g,f,L,_,b,h,t,s,u,r,o,w,a):null}const x=(m-e+(S-n)-y)/2;if(null!==this.ContinueProcessingPredicate&&!this.ContinueProcessingPredicate(m,x))return a[0]=!0,s[0]=m,o[0]=S,x>0&&y<=1448?this.WALKTRACE(k,c,d,v,C,g,f,L,_,b,h,t,s,u,r,o,w,a):(e++,n++,[new i(e,t-e+1,n,r-n+1)]);g=this.ClipDiagonalBound(C-y,y,C,p),f=this.ClipDiagonalBound(C+y,y,C,p);for(let i=g;i<=f;i+=2){h=i===g||i<f&&b[i-1]>=b[i+1]?b[i+1]-1:b[i-1],u=h-(i-C)-L;const l=h;for(;h>e&&u>n&&this.ElementsAreEqual(h,u);)h--,u--;if(b[i]=h,w&&Math.abs(i-k)<=y&&h<=_[i])return s[0]=h,o[0]=u,l>=_[i]&&y<=1448?this.WALKTRACE(k,c,d,v,C,g,f,L,_,b,h,t,s,u,r,o,w,a):null}if(y<=1447){let e=new Int32Array(d-c+2);e[0]=k-c+1,l.Copy2(_,c,e,1,d-c+1),this.m_forwardHistory.push(e),e=new Int32Array(f-g+2),e[0]=C-g+1,l.Copy2(b,g,e,1,f-g+1),this.m_reverseHistory.push(e)}}return this.WALKTRACE(k,c,d,v,C,g,f,L,_,b,h,t,s,u,r,o,w,a)}PrettifyChanges(e){for(let t=0;t<e.length;t++){const n=e[t],i=t<e.length-1?e[t+1].originalStart:this._originalElementsOrHash.length,r=t<e.length-1?e[t+1].modifiedStart:this._modifiedElementsOrHash.length,s=n.originalLength>0,o=n.modifiedLength>0;for(;n.originalStart+n.originalLength<i&&n.modifiedStart+n.modifiedLength<r&&(!s||this.OriginalElementsAreEqual(n.originalStart,n.originalStart+n.originalLength))&&(!o||this.ModifiedElementsAreEqual(n.modifiedStart,n.modifiedStart+n.modifiedLength));){const e=this.ElementsAreStrictEqual(n.originalStart,n.modifiedStart);if(this.ElementsAreStrictEqual(n.originalStart+n.originalLength,n.modifiedStart+n.modifiedLength)&&!e)break;n.originalStart++,n.modifiedStart++}const a=[null];t<e.length-1&&this.ChangesOverlap(e[t],e[t+1],a)&&(e[t]=a[0],e.splice(t+1,1),t--)}for(let t=e.length-1;t>=0;t--){const n=e[t];let i=0,r=0;if(t>0){const n=e[t-1];i=n.originalStart+n.originalLength,r=n.modifiedStart+n.modifiedLength}const s=n.originalLength>0,o=n.modifiedLength>0;let a=0,l=this._boundaryScore(n.originalStart,n.originalLength,n.modifiedStart,n.modifiedLength);for(let e=1;;e++){const t=n.originalStart-e,h=n.modifiedStart-e;if(t<i||h<r)break;if(s&&!this.OriginalElementsAreEqual(t,t+n.originalLength))break;if(o&&!this.ModifiedElementsAreEqual(h,h+n.modifiedLength))break;const u=(t===i&&h===r?5:0)+this._boundaryScore(t,n.originalLength,h,n.modifiedLength);u>l&&(l=u,a=e)}n.originalStart-=a,n.modifiedStart-=a;const h=[null];t>0&&this.ChangesOverlap(e[t-1],e[t],h)&&(e[t-1]=h[0],e.splice(t,1),t++)}if(this._hasStrings)for(let t=1,n=e.length;t<n;t++){const n=e[t-1],i=e[t],r=i.originalStart-n.originalStart-n.originalLength,s=n.originalStart,o=i.originalStart+i.originalLength,a=o-s,l=n.modifiedStart,h=i.modifiedStart+i.modifiedLength,u=h-l;if(r<5&&a<20&&u<20){const e=this._findBetterContiguousSequence(s,a,l,u,r);if(e){const[t,s]=e;t===n.originalStart+n.originalLength&&s===n.modifiedStart+n.modifiedLength||(n.originalLength=t-n.originalStart,n.modifiedLength=s-n.modifiedStart,i.originalStart=t+r,i.modifiedStart=s+r,i.originalLength=o-i.originalStart,i.modifiedLength=h-i.modifiedStart)}}}return e}_findBetterContiguousSequence(e,t,n,i,r){if(t<r||i<r)return null;const s=e+t-r+1,o=n+i-r+1;let a=0,l=0,h=0;for(let t=e;t<s;t++)for(let e=n;e<o;e++){const n=this._contiguousSequenceScore(t,e,r);n>0&&n>a&&(a=n,l=t,h=e)}return a>0?[l,h]:null}_contiguousSequenceScore(e,t,n){let i=0;for(let r=0;r<n;r++){if(!this.ElementsAreEqual(e+r,t+r))return 0;i+=this._originalStringElements[e+r].length}return i}_OriginalIsBoundary(e){return e<=0||e>=this._originalElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._originalStringElements[e])}_OriginalRegionIsBoundary(e,t){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(t>0){const n=e+t;if(this._OriginalIsBoundary(n-1)||this._OriginalIsBoundary(n))return!0}return!1}_ModifiedIsBoundary(e){return e<=0||e>=this._modifiedElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[e])}_ModifiedRegionIsBoundary(e,t){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(t>0){const n=e+t;if(this._ModifiedIsBoundary(n-1)||this._ModifiedIsBoundary(n))return!0}return!1}_boundaryScore(e,t,n,i){return(this._OriginalRegionIsBoundary(e,t)?1:0)+(this._ModifiedRegionIsBoundary(n,i)?1:0)}ConcatenateChanges(e,t){const n=[];if(0===e.length||0===t.length)return t.length>0?t:e;if(this.ChangesOverlap(e[e.length-1],t[0],n)){const i=new Array(e.length+t.length-1);return l.Copy(e,0,i,0,e.length-1),i[e.length-1]=n[0],l.Copy(t,1,i,e.length,t.length-1),i}{const n=new Array(e.length+t.length);return l.Copy(e,0,n,0,e.length),l.Copy(t,0,n,e.length,t.length),n}}ChangesOverlap(e,t,n){if(a.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),a.Assert(e.modifiedStart<=t.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=t.originalStart||e.modifiedStart+e.modifiedLength>=t.modifiedStart){const r=e.originalStart;let s=e.originalLength;const o=e.modifiedStart;let a=e.modifiedLength;return e.originalStart+e.originalLength>=t.originalStart&&(s=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(a=t.modifiedStart+t.modifiedLength-e.modifiedStart),n[0]=new i(r,s,o,a),!0}return n[0]=null,!1}ClipDiagonalBound(e,t,n,i){if(e>=0&&e<i)return e;const r=t%2==0;return e<0?r===(n%2==0)?0:1:r===((i-n-1)%2==0)?i-1:i-2}}var c=n(8061),d=n(7454);class g{constructor(e,t,n){const i=new Uint8Array(e*t);for(let r=0,s=e*t;r<s;r++)i[r]=n;this._data=i,this.rows=e,this.cols=t}get(e,t){return this._data[e*this.cols+t]}set(e,t,n){this._data[e*this.cols+t]=n}}class f{constructor(e){let t=0,n=0;for(let i=0,r=e.length;i<r;i++){const[r,s,o]=e[i];s>t&&(t=s),r>n&&(n=r),o>n&&(n=o)}t++,n++;const i=new g(n,t,0);for(let t=0,n=e.length;t<n;t++){const[n,r,s]=e[t];i.set(n,r,s)}this._states=i,this._maxCharCode=t}nextState(e,t){return t<0||t>=this._maxCharCode?0:this._states.get(e,t)}}let m=null,p=null;class _{static _createLink(e,t,n,i,r){let s=r-1;do{const n=t.charCodeAt(s);if(2!==e.get(n))break;s--}while(s>i);if(i>0){const e=t.charCodeAt(i-1),n=t.charCodeAt(s);(40===e&&41===n||91===e&&93===n||123===e&&125===n)&&s--}return{range:{startLineNumber:n,startColumn:i+1,endLineNumber:n,endColumn:s+2},url:t.substring(i,s+1)}}static computeLinks(e,t=function(){return null===m&&(m=new f([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),m}()){const n=function(){if(null===p){p=new d.V(0);const e=" \t<>'\"、。｡､，．：；‘〈「『〔（［｛｢｣｝］）〕』」〉’｀～…";for(let t=0;t<e.length;t++)p.set(e.charCodeAt(t),1);const t=".,;:";for(let e=0;e<t.length;e++)p.set(t.charCodeAt(e),2)}return p}(),i=[];for(let r=1,s=e.getLineCount();r<=s;r++){const s=e.getLineContent(r),o=s.length;let a=0,l=0,h=0,u=1,c=!1,d=!1,g=!1,f=!1;for(;a<o;){let e=!1;const o=s.charCodeAt(a);if(13===u){let t;switch(o){case 40:c=!0,t=0;break;case 41:t=c?0:1;break;case 91:g=!0,d=!0,t=0;break;case 93:g=!1,t=d?0:1;break;case 123:f=!0,t=0;break;case 125:t=f?0:1;break;case 39:case 34:case 96:t=h===o?1:39===h||34===h||96===h?0:1;break;case 42:t=42===h?1:0;break;case 124:t=124===h?1:0;break;case 32:t=g?0:1;break;default:t=n.get(o)}1===t&&(i.push(_._createLink(n,s,r,l,a)),e=!0)}else if(12===u){let t;91===o?(d=!0,t=0):t=n.get(o),1===t?e=!0:u=13}else u=t.nextState(u,o),0===u&&(e=!0);e&&(u=1,c=!1,d=!1,f=!1,l=a+1,h=o),a++}13===u&&i.push(_._createLink(n,s,r,l,o))}return i}}class b{constructor(){this._defaultValueSet=[["true","false"],["True","False"],["Private","Public","Friend","ReadOnly","Partial","Protected","WriteOnly"],["public","protected","private"]]}static{this.INSTANCE=new b}navigateValueSet(e,t,n,i,r){if(e&&t){const n=this.doNavigateValueSet(t,r);if(n)return{range:e,value:n}}if(n&&i){const e=this.doNavigateValueSet(i,r);if(e)return{range:n,value:e}}return null}doNavigateValueSet(e,t){const n=this.numberReplace(e,t);return null!==n?n:this.textReplace(e,t)}numberReplace(e,t){const n=Math.pow(10,e.length-(e.lastIndexOf(".")+1));let i=Number(e);const r=parseFloat(e);return isNaN(i)||isNaN(r)||i!==r?null:0!==i||t?(i=Math.floor(i*n),i+=t?n:-n,String(i/n)):null}textReplace(e,t){return this.valueSetsReplace(this._defaultValueSet,e,t)}valueSetsReplace(e,t,n){let i=null;for(let r=0,s=e.length;null===i&&r<s;r++)i=this.valueSetReplace(e[r],t,n);return i}valueSetReplace(e,t,n){let i=e.indexOf(t);return i>=0?(i+=n?1:-1,i<0?i=e.length-1:i%=e.length,e[i]):null}}var k=n(4858),C=n(6358),v=n(3013),L=n(9887);class w{constructor(e,t,n){this.changes=e,this.moves=t,this.hitTimeout=n}}class y{constructor(e,t){this.lineRangeMapping=e,this.changes=t}}var S=n(4327),x=n(9955),E=n(5365),N=n(7110),I=n(2532);n(8357);class T{constructor(e,t){this.range=e,this.text=t}toSingleEditOperation(){return{range:this.range,text:this.text}}}class A{static inverse(e,t,n){const i=[];let r=1,s=1;for(const t of e){const e=new A(new x.M(r,t.original.startLineNumber),new x.M(s,t.modified.startLineNumber));e.modified.isEmpty||i.push(e),r=t.original.endLineNumberExclusive,s=t.modified.endLineNumberExclusive}const o=new A(new x.M(r,t+1),new x.M(s,n+1));return o.modified.isEmpty||i.push(o),i}static clip(e,t,n){const i=[];for(const r of e){const e=r.original.intersect(t),s=r.modified.intersect(n);e&&!e.isEmpty&&s&&!s.isEmpty&&i.push(new A(e,s))}return i}constructor(e,t){this.original=e,this.modified=t}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new A(this.modified,this.original)}join(e){return new A(this.original.join(e.original),this.modified.join(e.modified))}toRangeMapping(){const e=this.original.toInclusiveRange(),t=this.modified.toInclusiveRange();if(e&&t)return new O(e,t);if(1===this.original.startLineNumber||1===this.modified.startLineNumber){if(1!==this.modified.startLineNumber||1!==this.original.startLineNumber)throw new S.D7("not a valid diff");return new O(new c.Q(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new c.Q(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1))}return new O(new c.Q(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),new c.Q(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER))}toRangeMapping2(e,t){if(M(this.original.endLineNumberExclusive,e)&&M(this.modified.endLineNumberExclusive,t))return new O(new c.Q(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new c.Q(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1));if(!this.original.isEmpty&&!this.modified.isEmpty)return new O(c.Q.fromPositions(new E.y(this.original.startLineNumber,1),R(new E.y(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),c.Q.fromPositions(new E.y(this.modified.startLineNumber,1),R(new E.y(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),t)));if(this.original.startLineNumber>1&&this.modified.startLineNumber>1)return new O(c.Q.fromPositions(R(new E.y(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER),e),R(new E.y(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),c.Q.fromPositions(R(new E.y(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER),t),R(new E.y(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),t)));throw new S.D7}}function R(e,t){if(e.lineNumber<1)return new E.y(1,1);if(e.lineNumber>t.length)return new E.y(t.length,t[t.length-1].length+1);const n=t[e.lineNumber-1];return e.column>n.length+1?new E.y(e.lineNumber,n.length+1):e}function M(e,t){return e>=1&&e<=t.length}class D extends A{static fromRangeMappings(e){const t=x.M.join(e.map((e=>x.M.fromRangeInclusive(e.originalRange)))),n=x.M.join(e.map((e=>x.M.fromRangeInclusive(e.modifiedRange))));return new D(t,n,e)}constructor(e,t,n){super(e,t),this.innerChanges=n}flip(){return new D(this.modified,this.original,this.innerChanges?.map((e=>e.flip())))}withInnerChangesFromLineRanges(){return new D(this.original,this.modified,[this.toRangeMapping()])}}class O{static assertSorted(e){for(let t=1;t<e.length;t++){const n=e[t-1],i=e[t];if(!n.originalRange.getEndPosition().isBeforeOrEqual(i.originalRange.getStartPosition())||!n.modifiedRange.getEndPosition().isBeforeOrEqual(i.modifiedRange.getStartPosition()))throw new S.D7("Range mappings must be sorted")}}constructor(e,t){this.originalRange=e,this.modifiedRange=t}toString(){return`{${this.originalRange.toString()}->${this.modifiedRange.toString()}}`}flip(){return new O(this.modifiedRange,this.originalRange)}toTextEdit(e){const t=e.getValueOfRange(this.modifiedRange);return new T(this.originalRange,t)}}var B=n(6844);class F{computeDiff(e,t,n){const i=new H(e,t,{maxComputationTime:n.maxComputationTimeMs,shouldIgnoreTrimWhitespace:n.ignoreTrimWhitespace,shouldComputeCharChanges:!0,shouldMakePrettyDiff:!0,shouldPostProcessCharChanges:!0}).computeDiff(),r=[];let s=null;for(const e of i.changes){let t,n;t=0===e.originalEndLineNumber?new x.M(e.originalStartLineNumber+1,e.originalStartLineNumber+1):new x.M(e.originalStartLineNumber,e.originalEndLineNumber+1),n=0===e.modifiedEndLineNumber?new x.M(e.modifiedStartLineNumber+1,e.modifiedStartLineNumber+1):new x.M(e.modifiedStartLineNumber,e.modifiedEndLineNumber+1);let i=new D(t,n,e.charChanges?.map((e=>new O(new c.Q(e.originalStartLineNumber,e.originalStartColumn,e.originalEndLineNumber,e.originalEndColumn),new c.Q(e.modifiedStartLineNumber,e.modifiedStartColumn,e.modifiedEndLineNumber,e.modifiedEndColumn)))));s&&(s.modified.endLineNumberExclusive!==i.modified.startLineNumber&&s.original.endLineNumberExclusive!==i.original.startLineNumber||(i=new D(s.original.join(i.original),s.modified.join(i.modified),s.innerChanges&&i.innerChanges?s.innerChanges.concat(i.innerChanges):void 0),r.pop())),r.push(i),s=i}return(0,N.Ft)((()=>(0,N.Xo)(r,((e,t)=>t.original.startLineNumber-e.original.endLineNumberExclusive==t.modified.startLineNumber-e.modified.endLineNumberExclusive&&e.original.endLineNumberExclusive<t.original.startLineNumber&&e.modified.endLineNumberExclusive<t.modified.startLineNumber)))),new w(r,[],i.quitEarly)}}function P(e,t,n,i){return new u(e,t,n).ComputeDiff(i)}class z{constructor(e){const t=[],n=[];for(let i=0,r=e.length;i<r;i++)t[i]=U(e[i],1),n[i]=K(e[i],1);this.lines=e,this._startColumns=t,this._endColumns=n}getElements(){const e=[];for(let t=0,n=this.lines.length;t<n;t++)e[t]=this.lines[t].substring(this._startColumns[t]-1,this._endColumns[t]-1);return e}getStrictElement(e){return this.lines[e]}getStartLineNumber(e){return e+1}getEndLineNumber(e){return e+1}createCharSequence(e,t,n){const i=[],r=[],s=[];let o=0;for(let a=t;a<=n;a++){const t=this.lines[a],l=e?this._startColumns[a]:1,h=e?this._endColumns[a]:t.length+1;for(let e=l;e<h;e++)i[o]=t.charCodeAt(e-1),r[o]=a+1,s[o]=e,o++;!e&&a<n&&(i[o]=10,r[o]=a+1,s[o]=t.length+1,o++)}return new V(i,r,s)}}class V{constructor(e,t,n){this._charCodes=e,this._lineNumbers=t,this._columns=n}toString(){return"["+this._charCodes.map(((e,t)=>(10===e?"\\n":String.fromCharCode(e))+`-(${this._lineNumbers[t]},${this._columns[t]})`)).join(", ")+"]"}_assertIndex(e,t){if(e<0||e>=t.length)throw new Error("Illegal index")}getElements(){return this._charCodes}getStartLineNumber(e){return e>0&&e===this._lineNumbers.length?this.getEndLineNumber(e-1):(this._assertIndex(e,this._lineNumbers),this._lineNumbers[e])}getEndLineNumber(e){return-1===e?this.getStartLineNumber(e+1):(this._assertIndex(e,this._lineNumbers),10===this._charCodes[e]?this._lineNumbers[e]+1:this._lineNumbers[e])}getStartColumn(e){return e>0&&e===this._columns.length?this.getEndColumn(e-1):(this._assertIndex(e,this._columns),this._columns[e])}getEndColumn(e){return-1===e?this.getStartColumn(e+1):(this._assertIndex(e,this._columns),10===this._charCodes[e]?1:this._columns[e]+1)}}class q{constructor(e,t,n,i,r,s,o,a){this.originalStartLineNumber=e,this.originalStartColumn=t,this.originalEndLineNumber=n,this.originalEndColumn=i,this.modifiedStartLineNumber=r,this.modifiedStartColumn=s,this.modifiedEndLineNumber=o,this.modifiedEndColumn=a}static createFromDiffChange(e,t,n){const i=t.getStartLineNumber(e.originalStart),r=t.getStartColumn(e.originalStart),s=t.getEndLineNumber(e.originalStart+e.originalLength-1),o=t.getEndColumn(e.originalStart+e.originalLength-1),a=n.getStartLineNumber(e.modifiedStart),l=n.getStartColumn(e.modifiedStart),h=n.getEndLineNumber(e.modifiedStart+e.modifiedLength-1),u=n.getEndColumn(e.modifiedStart+e.modifiedLength-1);return new q(i,r,s,o,a,l,h,u)}}class W{constructor(e,t,n,i,r){this.originalStartLineNumber=e,this.originalEndLineNumber=t,this.modifiedStartLineNumber=n,this.modifiedEndLineNumber=i,this.charChanges=r}static createFromDiffResult(e,t,n,i,r,s,o){let a,l,h,u,c;if(0===t.originalLength?(a=n.getStartLineNumber(t.originalStart)-1,l=0):(a=n.getStartLineNumber(t.originalStart),l=n.getEndLineNumber(t.originalStart+t.originalLength-1)),0===t.modifiedLength?(h=i.getStartLineNumber(t.modifiedStart)-1,u=0):(h=i.getStartLineNumber(t.modifiedStart),u=i.getEndLineNumber(t.modifiedStart+t.modifiedLength-1)),s&&t.originalLength>0&&t.originalLength<20&&t.modifiedLength>0&&t.modifiedLength<20&&r()){const s=n.createCharSequence(e,t.originalStart,t.originalStart+t.originalLength-1),a=i.createCharSequence(e,t.modifiedStart,t.modifiedStart+t.modifiedLength-1);if(s.getElements().length>0&&a.getElements().length>0){let e=P(s,a,r,!0).changes;o&&(e=function(e){if(e.length<=1)return e;const t=[e[0]];let n=t[0];for(let i=1,r=e.length;i<r;i++){const r=e[i],s=r.originalStart-(n.originalStart+n.originalLength),o=r.modifiedStart-(n.modifiedStart+n.modifiedLength);Math.min(s,o)<3?(n.originalLength=r.originalStart+r.originalLength-n.originalStart,n.modifiedLength=r.modifiedStart+r.modifiedLength-n.modifiedStart):(t.push(r),n=r)}return t}(e)),c=[];for(let t=0,n=e.length;t<n;t++)c.push(q.createFromDiffChange(e[t],s,a))}}return new W(a,l,h,u,c)}}class H{constructor(e,t,n){this.shouldComputeCharChanges=n.shouldComputeCharChanges,this.shouldPostProcessCharChanges=n.shouldPostProcessCharChanges,this.shouldIgnoreTrimWhitespace=n.shouldIgnoreTrimWhitespace,this.shouldMakePrettyDiff=n.shouldMakePrettyDiff,this.originalLines=e,this.modifiedLines=t,this.original=new z(e),this.modified=new z(t),this.continueLineDiff=j(n.maxComputationTime),this.continueCharDiff=j(0===n.maxComputationTime?0:Math.min(n.maxComputationTime,5e3))}computeDiff(){if(1===this.original.lines.length&&0===this.original.lines[0].length)return 1===this.modified.lines.length&&0===this.modified.lines[0].length?{quitEarly:!1,changes:[]}:{quitEarly:!1,changes:[{originalStartLineNumber:1,originalEndLineNumber:1,modifiedStartLineNumber:1,modifiedEndLineNumber:this.modified.lines.length,charChanges:void 0}]};if(1===this.modified.lines.length&&0===this.modified.lines[0].length)return{quitEarly:!1,changes:[{originalStartLineNumber:1,originalEndLineNumber:this.original.lines.length,modifiedStartLineNumber:1,modifiedEndLineNumber:1,charChanges:void 0}]};const e=P(this.original,this.modified,this.continueLineDiff,this.shouldMakePrettyDiff),t=e.changes,n=e.quitEarly;if(this.shouldIgnoreTrimWhitespace){const e=[];for(let n=0,i=t.length;n<i;n++)e.push(W.createFromDiffResult(this.shouldIgnoreTrimWhitespace,t[n],this.original,this.modified,this.continueCharDiff,this.shouldComputeCharChanges,this.shouldPostProcessCharChanges));return{quitEarly:n,changes:e}}const i=[];let r=0,s=0;for(let e=-1,n=t.length;e<n;e++){const o=e+1<n?t[e+1]:null,a=o?o.originalStart:this.originalLines.length,l=o?o.modifiedStart:this.modifiedLines.length;for(;r<a&&s<l;){const e=this.originalLines[r],t=this.modifiedLines[s];if(e!==t){{let n=U(e,1),o=U(t,1);for(;n>1&&o>1&&e.charCodeAt(n-2)===t.charCodeAt(o-2);)n--,o--;(n>1||o>1)&&this._pushTrimWhitespaceCharChange(i,r+1,1,n,s+1,1,o)}{let n=K(e,1),o=K(t,1);const a=e.length+1,l=t.length+1;for(;n<a&&o<l&&e.charCodeAt(n-1)===e.charCodeAt(o-1);)n++,o++;(n<a||o<l)&&this._pushTrimWhitespaceCharChange(i,r+1,n,a,s+1,o,l)}}r++,s++}o&&(i.push(W.createFromDiffResult(this.shouldIgnoreTrimWhitespace,o,this.original,this.modified,this.continueCharDiff,this.shouldComputeCharChanges,this.shouldPostProcessCharChanges)),r+=o.originalLength,s+=o.modifiedLength)}return{quitEarly:n,changes:i}}_pushTrimWhitespaceCharChange(e,t,n,i,r,s,o){if(this._mergeTrimWhitespaceCharChange(e,t,n,i,r,s,o))return;let a;this.shouldComputeCharChanges&&(a=[new q(t,n,t,i,r,s,r,o)]),e.push(new W(t,t,r,r,a))}_mergeTrimWhitespaceCharChange(e,t,n,i,r,s,o){const a=e.length;if(0===a)return!1;const l=e[a-1];return 0!==l.originalEndLineNumber&&0!==l.modifiedEndLineNumber&&(l.originalEndLineNumber===t&&l.modifiedEndLineNumber===r?(this.shouldComputeCharChanges&&l.charChanges&&l.charChanges.push(new q(t,n,t,i,r,s,r,o)),!0):l.originalEndLineNumber+1===t&&l.modifiedEndLineNumber+1===r&&(l.originalEndLineNumber=t,l.modifiedEndLineNumber=r,this.shouldComputeCharChanges&&l.charChanges&&l.charChanges.push(new q(t,n,t,i,r,s,r,o)),!0))}}function U(e,t){const n=B.HG(e);return-1===n?t:n+1}function K(e,t){const n=B.lT(e);return-1===n?t:n+2}function j(e){if(0===e)return()=>!0;const t=Date.now();return()=>Date.now()-t<e}var $=n(3338);class G{static trivial(e,t){return new G([new Q(I.L.ofLength(e.length),I.L.ofLength(t.length))],!1)}static trivialTimedOut(e,t){return new G([new Q(I.L.ofLength(e.length),I.L.ofLength(t.length))],!0)}constructor(e,t){this.diffs=e,this.hitTimeout=t}}class Q{static invert(e,t){const n=[];return(0,$.pN)(e,((e,i)=>{n.push(Q.fromOffsetPairs(e?e.getEndExclusives():Y.zero,i?i.getStarts():new Y(t,(e?e.seq2Range.endExclusive-e.seq1Range.endExclusive:0)+t)))})),n}static fromOffsetPairs(e,t){return new Q(new I.L(e.offset1,t.offset1),new I.L(e.offset2,t.offset2))}static assertSorted(e){let t;for(const n of e){if(t&&!(t.seq1Range.endExclusive<=n.seq1Range.start&&t.seq2Range.endExclusive<=n.seq2Range.start))throw new S.D7("Sequence diffs must be sorted");t=n}}constructor(e,t){this.seq1Range=e,this.seq2Range=t}swap(){return new Q(this.seq2Range,this.seq1Range)}toString(){return`${this.seq1Range} <-> ${this.seq2Range}`}join(e){return new Q(this.seq1Range.join(e.seq1Range),this.seq2Range.join(e.seq2Range))}delta(e){return 0===e?this:new Q(this.seq1Range.delta(e),this.seq2Range.delta(e))}deltaStart(e){return 0===e?this:new Q(this.seq1Range.deltaStart(e),this.seq2Range.deltaStart(e))}deltaEnd(e){return 0===e?this:new Q(this.seq1Range.deltaEnd(e),this.seq2Range.deltaEnd(e))}intersect(e){const t=this.seq1Range.intersect(e.seq1Range),n=this.seq2Range.intersect(e.seq2Range);if(t&&n)return new Q(t,n)}getStarts(){return new Y(this.seq1Range.start,this.seq2Range.start)}getEndExclusives(){return new Y(this.seq1Range.endExclusive,this.seq2Range.endExclusive)}}class Y{static{this.zero=new Y(0,0)}static{this.max=new Y(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER)}constructor(e,t){this.offset1=e,this.offset2=t}toString(){return`${this.offset1} <-> ${this.offset2}`}delta(e){return 0===e?this:new Y(this.offset1+e,this.offset2+e)}equals(e){return this.offset1===e.offset1&&this.offset2===e.offset2}}class X{static{this.instance=new X}isValid(){return!0}}class Z{constructor(e){if(this.timeout=e,this.startTime=Date.now(),this.valid=!0,e<=0)throw new S.D7("timeout must be positive")}isValid(){return!(Date.now()-this.startTime<this.timeout)&&this.valid&&(this.valid=!1),this.valid}}class J{constructor(e,t){this.width=e,this.height=t,this.array=[],this.array=new Array(e*t)}get(e,t){return this.array[e+t*this.width]}set(e,t,n){this.array[e+t*this.width]=n}}function ee(e){return 32===e||9===e}class te{static{this.chrKeys=new Map}static getKey(e){let t=this.chrKeys.get(e);return void 0===t&&(t=this.chrKeys.size,this.chrKeys.set(e,t)),t}constructor(e,t,n){this.range=e,this.lines=t,this.source=n,this.histogram=[];let i=0;for(let n=e.startLineNumber-1;n<e.endLineNumberExclusive-1;n++){const e=t[n];for(let t=0;t<e.length;t++){i++;const n=e[t],r=te.getKey(n);this.histogram[r]=(this.histogram[r]||0)+1}i++;const r=te.getKey("\n");this.histogram[r]=(this.histogram[r]||0)+1}this.totalCount=i}computeSimilarity(e){let t=0;const n=Math.max(this.histogram.length,e.histogram.length);for(let i=0;i<n;i++)t+=Math.abs((this.histogram[i]??0)-(e.histogram[i]??0));return 1-t/(this.totalCount+e.totalCount)}}class ne{compute(e,t,n=X.instance,i){if(0===e.length||0===t.length)return G.trivial(e,t);const r=new J(e.length,t.length),s=new J(e.length,t.length),o=new J(e.length,t.length);for(let a=0;a<e.length;a++)for(let l=0;l<t.length;l++){if(!n.isValid())return G.trivialTimedOut(e,t);const h=0===a?0:r.get(a-1,l),u=0===l?0:r.get(a,l-1);let c;e.getElement(a)===t.getElement(l)?(c=0===a||0===l?0:r.get(a-1,l-1),a>0&&l>0&&3===s.get(a-1,l-1)&&(c+=o.get(a-1,l-1)),c+=i?i(a,l):1):c=-1;const d=Math.max(h,u,c);if(d===c){const e=a>0&&l>0?o.get(a-1,l-1):0;o.set(a,l,e+1),s.set(a,l,3)}else d===h?(o.set(a,l,0),s.set(a,l,1)):d===u&&(o.set(a,l,0),s.set(a,l,2));r.set(a,l,d)}const a=[];let l=e.length,h=t.length;function u(e,t){e+1===l&&t+1===h||a.push(new Q(new I.L(e+1,l),new I.L(t+1,h))),l=e,h=t}let c=e.length-1,d=t.length-1;for(;c>=0&&d>=0;)3===s.get(c,d)?(u(c,d),c--,d--):1===s.get(c,d)?c--:d--;return u(-1,-1),a.reverse(),new G(a,!1)}}class ie{compute(e,t,n=X.instance){if(0===e.length||0===t.length)return G.trivial(e,t);const i=e,r=t;function s(e,t){for(;e<i.length&&t<r.length&&i.getElement(e)===r.getElement(t);)e++,t++;return e}let o=0;const a=new se;a.set(0,s(0,0));const l=new oe;l.set(0,0===a.get(0)?null:new re(null,0,0,a.get(0)));let h=0;e:for(;;){if(o++,!n.isValid())return G.trivialTimedOut(i,r);const e=-Math.min(o,r.length+o%2),t=Math.min(o,i.length+o%2);for(h=e;h<=t;h+=2){let n=0;const o=h===t?-1:a.get(h+1),u=h===e?-1:a.get(h-1)+1;n++;const c=Math.min(Math.max(o,u),i.length),d=c-h;if(n++,c>i.length||d>r.length)continue;const g=s(c,d);a.set(h,g);const f=c===o?l.get(h+1):l.get(h-1);if(l.set(h,g!==c?new re(f,c,d,g-c):f),a.get(h)===i.length&&a.get(h)-h===r.length)break e}}let u=l.get(h);const c=[];let d=i.length,g=r.length;for(;;){const e=u?u.x+u.length:0,t=u?u.y+u.length:0;if(e===d&&t===g||c.push(new Q(new I.L(e,d),new I.L(t,g))),!u)break;d=u.x,g=u.y,u=u.prev}return c.reverse(),new G(c,!1)}}class re{constructor(e,t,n,i){this.prev=e,this.x=t,this.y=n,this.length=i}}class se{constructor(){this.positiveArr=new Int32Array(10),this.negativeArr=new Int32Array(10)}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,t){if(e<0){if((e=-e-1)>=this.negativeArr.length){const e=this.negativeArr;this.negativeArr=new Int32Array(2*e.length),this.negativeArr.set(e)}this.negativeArr[e]=t}else{if(e>=this.positiveArr.length){const e=this.positiveArr;this.positiveArr=new Int32Array(2*e.length),this.positiveArr.set(e)}this.positiveArr[e]=t}}}class oe{constructor(){this.positiveArr=[],this.negativeArr=[]}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,t){e<0?(e=-e-1,this.negativeArr[e]=t):this.positiveArr[e]=t}}var ae=n(7393),le=n(7992);class he{constructor(e,t,n){this.lines=e,this.range=t,this.considerWhitespaceChanges=n,this.elements=[],this.firstElementOffsetByLineIdx=[],this.lineStartOffsets=[],this.trimmedWsLengthsByLineIdx=[],this.firstElementOffsetByLineIdx.push(0);for(let t=this.range.startLineNumber;t<=this.range.endLineNumber;t++){let i=e[t-1],r=0;t===this.range.startLineNumber&&this.range.startColumn>1&&(r=this.range.startColumn-1,i=i.substring(r)),this.lineStartOffsets.push(r);let s=0;if(!n){const e=i.trimStart();s=i.length-e.length,i=e.trimEnd()}this.trimmedWsLengthsByLineIdx.push(s);const o=t===this.range.endLineNumber?Math.min(this.range.endColumn-1-r-s,i.length):i.length;for(let e=0;e<o;e++)this.elements.push(i.charCodeAt(e));t<this.range.endLineNumber&&(this.elements.push("\n".charCodeAt(0)),this.firstElementOffsetByLineIdx.push(this.elements.length))}}toString(){return`Slice: "${this.text}"`}get text(){return this.getText(new I.L(0,this.length))}getText(e){return this.elements.slice(e.start,e.endExclusive).map((e=>String.fromCharCode(e))).join("")}getElement(e){return this.elements[e]}get length(){return this.elements.length}getBoundaryScore(e){const t=ge(e>0?this.elements[e-1]:-1),n=ge(e<this.elements.length?this.elements[e]:-1);if(7===t&&8===n)return 0;if(8===t)return 150;let i=0;return t!==n&&(i+=10,0===t&&1===n&&(i+=1)),i+=de(t),i+=de(n),i}translateOffset(e,t="right"){const n=(0,ae.iM)(this.firstElementOffsetByLineIdx,(t=>t<=e)),i=e-this.firstElementOffsetByLineIdx[n];return new E.y(this.range.startLineNumber+n,1+this.lineStartOffsets[n]+i+(0===i&&"left"===t?0:this.trimmedWsLengthsByLineIdx[n]))}translateRange(e){const t=this.translateOffset(e.start,"right"),n=this.translateOffset(e.endExclusive,"left");return n.isBefore(t)?c.Q.fromPositions(n,n):c.Q.fromPositions(t,n)}findWordContaining(e){if(e<0||e>=this.elements.length)return;if(!ue(this.elements[e]))return;let t=e;for(;t>0&&ue(this.elements[t-1]);)t--;let n=e;for(;n<this.elements.length&&ue(this.elements[n]);)n++;return new I.L(t,n)}countLinesIn(e){return this.translateOffset(e.endExclusive).lineNumber-this.translateOffset(e.start).lineNumber}isStronglyEqual(e,t){return this.elements[e]===this.elements[t]}extendToFullLines(e){const t=(0,ae.lx)(this.firstElementOffsetByLineIdx,(t=>t<=e.start))??0,n=(0,ae.XP)(this.firstElementOffsetByLineIdx,(t=>e.endExclusive<=t))??this.elements.length;return new I.L(t,n)}}function ue(e){return e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57}const ce={0:0,1:0,2:0,3:10,4:2,5:30,6:3,7:10,8:10};function de(e){return ce[e]}function ge(e){return 10===e?8:13===e?7:ee(e)?6:e>=97&&e<=122?0:e>=65&&e<=90?1:e>=48&&e<=57?2:-1===e?3:44===e||59===e?5:4}function fe(e,t,n){if(e.trim()===t.trim())return!0;if(e.length>300&&t.length>300)return!1;const i=(new ie).compute(new he([e],new c.Q(1,1,1,e.length),!1),new he([t],new c.Q(1,1,1,t.length),!1),n);let r=0;const s=Q.invert(i.diffs,e.length);for(const t of s)t.seq1Range.forEach((t=>{ee(e.charCodeAt(t))||r++}));const o=function(t){let n=0;for(let i=0;i<e.length;i++)ee(t.charCodeAt(i))||n++;return n}(e.length>t.length?e:t);return r/o>.6&&o>10}function me(e,t,n){let i=n;return i=pe(e,t,i),i=pe(e,t,i),i=function(e,t,n){if(!e.getBoundaryScore||!t.getBoundaryScore)return n;for(let i=0;i<n.length;i++){const r=i>0?n[i-1]:void 0,s=n[i],o=i+1<n.length?n[i+1]:void 0,a=new I.L(r?r.seq1Range.endExclusive+1:0,o?o.seq1Range.start-1:e.length),l=new I.L(r?r.seq2Range.endExclusive+1:0,o?o.seq2Range.start-1:t.length);s.seq1Range.isEmpty?n[i]=_e(s,e,t,a,l):s.seq2Range.isEmpty&&(n[i]=_e(s.swap(),t,e,l,a).swap())}return n}(e,t,i),i}function pe(e,t,n){if(0===n.length)return n;const i=[];i.push(n[0]);for(let r=1;r<n.length;r++){const s=i[i.length-1];let o=n[r];if(o.seq1Range.isEmpty||o.seq2Range.isEmpty){const n=o.seq1Range.start-s.seq1Range.endExclusive;let r;for(r=1;r<=n&&e.getElement(o.seq1Range.start-r)===e.getElement(o.seq1Range.endExclusive-r)&&t.getElement(o.seq2Range.start-r)===t.getElement(o.seq2Range.endExclusive-r);r++);if(r--,r===n){i[i.length-1]=new Q(new I.L(s.seq1Range.start,o.seq1Range.endExclusive-n),new I.L(s.seq2Range.start,o.seq2Range.endExclusive-n));continue}o=o.delta(-r)}i.push(o)}const r=[];for(let n=0;n<i.length-1;n++){const s=i[n+1];let o=i[n];if(o.seq1Range.isEmpty||o.seq2Range.isEmpty){const r=s.seq1Range.start-o.seq1Range.endExclusive;let a;for(a=0;a<r&&e.isStronglyEqual(o.seq1Range.start+a,o.seq1Range.endExclusive+a)&&t.isStronglyEqual(o.seq2Range.start+a,o.seq2Range.endExclusive+a);a++);if(a===r){i[n+1]=new Q(new I.L(o.seq1Range.start+r,s.seq1Range.endExclusive),new I.L(o.seq2Range.start+r,s.seq2Range.endExclusive));continue}a>0&&(o=o.delta(a))}r.push(o)}return i.length>0&&r.push(i[i.length-1]),r}function _e(e,t,n,i,r){let s=1;for(;e.seq1Range.start-s>=i.start&&e.seq2Range.start-s>=r.start&&n.isStronglyEqual(e.seq2Range.start-s,e.seq2Range.endExclusive-s)&&s<100;)s++;s--;let o=0;for(;e.seq1Range.start+o<i.endExclusive&&e.seq2Range.endExclusive+o<r.endExclusive&&n.isStronglyEqual(e.seq2Range.start+o,e.seq2Range.endExclusive+o)&&o<100;)o++;if(0===s&&0===o)return e;let a=0,l=-1;for(let i=-s;i<=o;i++){const r=e.seq2Range.start+i,s=e.seq2Range.endExclusive+i,o=e.seq1Range.start+i,h=t.getBoundaryScore(o)+n.getBoundaryScore(r)+n.getBoundaryScore(s);h>l&&(l=h,a=i)}return e.delta(a)}class be{constructor(e,t){this.trimmedHash=e,this.lines=t}getElement(e){return this.trimmedHash[e]}get length(){return this.trimmedHash.length}getBoundaryScore(e){return 1e3-((0===e?0:ke(this.lines[e-1]))+(e===this.lines.length?0:ke(this.lines[e])))}getText(e){return this.lines.slice(e.start,e.endExclusive).join("\n")}isStronglyEqual(e,t){return this.lines[e]===this.lines[t]}}function ke(e){let t=0;for(;t<e.length&&(32===e.charCodeAt(t)||9===e.charCodeAt(t));)t++;return t}class Ce{constructor(){this.dynamicProgrammingDiffing=new ne,this.myersDiffingAlgorithm=new ie}computeDiff(e,t,n){if(e.length<=1&&(0,$.aI)(e,t,((e,t)=>e===t)))return new w([],[],!1);if(1===e.length&&0===e[0].length||1===t.length&&0===t[0].length)return new w([new D(new x.M(1,e.length+1),new x.M(1,t.length+1),[new O(new c.Q(1,1,e.length,e[e.length-1].length+1),new c.Q(1,1,t.length,t[t.length-1].length+1))])],[],!1);const i=0===n.maxComputationTimeMs?X.instance:new Z(n.maxComputationTimeMs),r=!n.ignoreTrimWhitespace,s=new Map;function o(e){let t=s.get(e);return void 0===t&&(t=s.size,s.set(e,t)),t}const a=e.map((e=>o(e.trim()))),l=t.map((e=>o(e.trim()))),h=new be(a,e),u=new be(l,t),d=(()=>h.length+u.length<1700?this.dynamicProgrammingDiffing.compute(h,u,i,((n,i)=>e[n]===t[i]?0===t[i].length?.1:1+Math.log(1+t[i].length):.99)):this.myersDiffingAlgorithm.compute(h,u,i))();let g=d.diffs,f=d.hitTimeout;g=me(h,u,g),g=function(e,t,n){let i=n;if(0===i.length)return i;let r,s=0;do{r=!1;const o=[i[0]];for(let a=1;a<i.length;a++){const l=i[a],h=o[o.length-1];function u(t,n){const i=new I.L(h.seq1Range.endExclusive,l.seq1Range.start);return e.getText(i).replace(/\s/g,"").length<=4&&(t.seq1Range.length+t.seq2Range.length>5||n.seq1Range.length+n.seq2Range.length>5)}u(h,l)?(r=!0,o[o.length-1]=o[o.length-1].join(l)):o.push(l)}i=o}while(s++<10&&r);return i}(h,0,g);const m=[],p=n=>{if(r)for(let s=0;s<n;s++){const n=_+s,o=b+s;if(e[n]!==t[o]){const s=this.refineDiff(e,t,new Q(new I.L(n,n+1),new I.L(o,o+1)),i,r);for(const e of s.mappings)m.push(e);s.hitTimeout&&(f=!0)}}};let _=0,b=0;for(const n of g){(0,N.Ft)((()=>n.seq1Range.start-_==n.seq2Range.start-b)),p(n.seq1Range.start-_),_=n.seq1Range.endExclusive,b=n.seq2Range.endExclusive;const s=this.refineDiff(e,t,n,i,r);s.hitTimeout&&(f=!0);for(const e of s.mappings)m.push(e)}p(e.length-_);const k=ve(m,e,t);let C=[];return n.computeMoves&&(C=this.computeMoves(k,e,t,a,l,i,r)),(0,N.Ft)((()=>{function n(e,t){if(e.lineNumber<1||e.lineNumber>t.length)return!1;const n=t[e.lineNumber-1];return!(e.column<1||e.column>n.length+1)}function i(e,t){return!(e.startLineNumber<1||e.startLineNumber>t.length+1||e.endLineNumberExclusive<1||e.endLineNumberExclusive>t.length+1)}for(const r of k){if(!r.innerChanges)return!1;for(const i of r.innerChanges)if(!(n(i.modifiedRange.getStartPosition(),t)&&n(i.modifiedRange.getEndPosition(),t)&&n(i.originalRange.getStartPosition(),e)&&n(i.originalRange.getEndPosition(),e)))return!1;if(!i(r.modified,t)||!i(r.original,e))return!1}return!0})),new w(k,C,f)}computeMoves(e,t,n,i,r,s,o){return function(e,t,n,i,r,s){let{moves:o,excludedChanges:a}=function(e,t,n,i){const r=[],s=e.filter((e=>e.modified.isEmpty&&e.original.length>=3)).map((e=>new te(e.original,t,e))),o=new Set(e.filter((e=>e.original.isEmpty&&e.modified.length>=3)).map((e=>new te(e.modified,n,e)))),a=new Set;for(const e of s){let t,n=-1;for(const i of o){const r=e.computeSimilarity(i);r>n&&(n=r,t=i)}if(n>.9&&t&&(o.delete(t),r.push(new A(e.range,t.range)),a.add(e.source),a.add(t.source)),!i.isValid())return{moves:r,excludedChanges:a}}return{moves:r,excludedChanges:a}}(e,t,n,s);if(!s.isValid())return[];const l=function(e,t,n,i,r,s){const o=[],a=new le.db;for(const n of e)for(let e=n.original.startLineNumber;e<n.original.endLineNumberExclusive-2;e++){const n=`${t[e-1]}:${t[e+1-1]}:${t[e+2-1]}`;a.add(n,{range:new x.M(e,e+3)})}const l=[];e.sort((0,$.VE)((e=>e.modified.startLineNumber),$.U9));for(const t of e){let e=[];for(let i=t.modified.startLineNumber;i<t.modified.endLineNumberExclusive-2;i++){const t=`${n[i-1]}:${n[i+1-1]}:${n[i+2-1]}`,r=new x.M(i,i+3),s=[];a.forEach(t,(({range:t})=>{for(const n of e)if(n.originalLineRange.endLineNumberExclusive+1===t.endLineNumberExclusive&&n.modifiedLineRange.endLineNumberExclusive+1===r.endLineNumberExclusive)return n.originalLineRange=new x.M(n.originalLineRange.startLineNumber,t.endLineNumberExclusive),n.modifiedLineRange=new x.M(n.modifiedLineRange.startLineNumber,r.endLineNumberExclusive),void s.push(n);const n={modifiedLineRange:r,originalLineRange:t};l.push(n),s.push(n)})),e=s}if(!s.isValid())return[]}l.sort((0,$.Hw)((0,$.VE)((e=>e.modifiedLineRange.length),$.U9)));const h=new x.S,u=new x.S;for(const e of l){const t=e.modifiedLineRange.startLineNumber-e.originalLineRange.startLineNumber,n=h.subtractFrom(e.modifiedLineRange),i=u.subtractFrom(e.originalLineRange).getWithDelta(t),r=n.getIntersection(i);for(const e of r.ranges){if(e.length<3)continue;const n=e,i=e.delta(-t);o.push(new A(i,n)),h.addRange(n),u.addRange(i)}}o.sort((0,$.VE)((e=>e.original.startLineNumber),$.U9));const c=new ae.vJ(e);for(let t=0;t<o.length;t++){const n=o[t],a=c.findLastMonotonous((e=>e.original.startLineNumber<=n.original.startLineNumber)),l=(0,ae.lx)(e,(e=>e.modified.startLineNumber<=n.modified.startLineNumber)),d=Math.max(n.original.startLineNumber-a.original.startLineNumber,n.modified.startLineNumber-l.modified.startLineNumber),g=c.findLastMonotonous((e=>e.original.startLineNumber<n.original.endLineNumberExclusive)),f=(0,ae.lx)(e,(e=>e.modified.startLineNumber<n.modified.endLineNumberExclusive)),m=Math.max(g.original.endLineNumberExclusive-n.original.endLineNumberExclusive,f.modified.endLineNumberExclusive-n.modified.endLineNumberExclusive);let p,_;for(p=0;p<d;p++){const e=n.original.startLineNumber-p-1,t=n.modified.startLineNumber-p-1;if(e>i.length||t>r.length)break;if(h.contains(t)||u.contains(e))break;if(!fe(i[e-1],r[t-1],s))break}for(p>0&&(u.addRange(new x.M(n.original.startLineNumber-p,n.original.startLineNumber)),h.addRange(new x.M(n.modified.startLineNumber-p,n.modified.startLineNumber))),_=0;_<m;_++){const e=n.original.endLineNumberExclusive+_,t=n.modified.endLineNumberExclusive+_;if(e>i.length||t>r.length)break;if(h.contains(t)||u.contains(e))break;if(!fe(i[e-1],r[t-1],s))break}_>0&&(u.addRange(new x.M(n.original.endLineNumberExclusive,n.original.endLineNumberExclusive+_)),h.addRange(new x.M(n.modified.endLineNumberExclusive,n.modified.endLineNumberExclusive+_))),(p>0||_>0)&&(o[t]=new A(new x.M(n.original.startLineNumber-p,n.original.endLineNumberExclusive+_),new x.M(n.modified.startLineNumber-p,n.modified.endLineNumberExclusive+_)))}return o}(e.filter((e=>!a.has(e))),i,r,t,n,s);return(0,$.E4)(o,l),o=function(e){if(0===e.length)return e;e.sort((0,$.VE)((e=>e.original.startLineNumber),$.U9));const t=[e[0]];for(let n=1;n<e.length;n++){const i=t[t.length-1],r=e[n],s=r.original.startLineNumber-i.original.endLineNumberExclusive,o=r.modified.startLineNumber-i.modified.endLineNumberExclusive;s>=0&&o>=0&&s+o<=2?t[t.length-1]=i.join(r):t.push(r)}return t}(o),o=o.filter((e=>{const n=e.original.toOffsetRange().slice(t).map((e=>e.trim()));return n.join("\n").length>=15&&function(e){let t=0;for(const n of e)n.length>=2&&t++;return t}(n)>=2})),o=function(e,t){const n=new ae.vJ(e);return t.filter((t=>(n.findLastMonotonous((e=>e.original.startLineNumber<t.original.endLineNumberExclusive))||new A(new x.M(1,1),new x.M(1,1)))!==(0,ae.lx)(e,(e=>e.modified.startLineNumber<t.modified.endLineNumberExclusive))))}(e,o),o}(e,t,n,i,r,s).map((e=>{const i=ve(this.refineDiff(t,n,new Q(e.original.toOffsetRange(),e.modified.toOffsetRange()),s,o).mappings,t,n,!0);return new y(e,i)}))}refineDiff(e,t,n,i,r){var s;const o=(s=n,new A(new x.M(s.seq1Range.start+1,s.seq1Range.endExclusive+1),new x.M(s.seq2Range.start+1,s.seq2Range.endExclusive+1))).toRangeMapping2(e,t),a=new he(e,o.originalRange,r),l=new he(t,o.modifiedRange,r),h=a.length+l.length<500?this.dynamicProgrammingDiffing.compute(a,l,i):this.myersDiffingAlgorithm.compute(a,l,i);let u=h.diffs;u=me(a,l,u),u=function(e,t,n){const i=Q.invert(n,e.length),r=[];let s=new Y(0,0);function o(n,o){if(n.offset1<s.offset1||n.offset2<s.offset2)return;const a=e.findWordContaining(n.offset1),l=t.findWordContaining(n.offset2);if(!a||!l)return;let h=new Q(a,l);const u=h.intersect(o);let c=u.seq1Range.length,d=u.seq2Range.length;for(;i.length>0;){const n=i[0];if(!n.seq1Range.intersects(h.seq1Range)&&!n.seq2Range.intersects(h.seq2Range))break;const r=e.findWordContaining(n.seq1Range.start),s=t.findWordContaining(n.seq2Range.start),o=new Q(r,s),a=o.intersect(n);if(c+=a.seq1Range.length,d+=a.seq2Range.length,h=h.join(o),!(h.seq1Range.endExclusive>=n.seq1Range.endExclusive))break;i.shift()}c+d<2*(h.seq1Range.length+h.seq2Range.length)/3&&r.push(h),s=h.getEndExclusives()}for(;i.length>0;){const e=i.shift();e.seq1Range.isEmpty||(o(e.getStarts(),e),o(e.getEndExclusives().delta(-1),e))}return function(e,t){const n=[];for(;e.length>0||t.length>0;){const i=e[0],r=t[0];let s;s=i&&(!r||i.seq1Range.start<r.seq1Range.start)?e.shift():t.shift(),n.length>0&&n[n.length-1].seq1Range.endExclusive>=s.seq1Range.start?n[n.length-1]=n[n.length-1].join(s):n.push(s)}return n}(n,r)}(a,l,u),u=function(e,t,n){const i=[];for(const e of n){const t=i[i.length-1];t&&(e.seq1Range.start-t.seq1Range.endExclusive<=2||e.seq2Range.start-t.seq2Range.endExclusive<=2)?i[i.length-1]=new Q(t.seq1Range.join(e.seq1Range),t.seq2Range.join(e.seq2Range)):i.push(e)}return i}(0,0,u),u=function(e,t,n){let i=n;if(0===i.length)return i;let r,s=0;do{r=!1;const a=[i[0]];for(let l=1;l<i.length;l++){const h=i[l],u=a[a.length-1];function c(n,i){const r=new I.L(u.seq1Range.endExclusive,h.seq1Range.start);if(e.countLinesIn(r)>5||r.length>500)return!1;const s=e.getText(r).trim();if(s.length>20||s.split(/\r\n|\r|\n/).length>1)return!1;const o=e.countLinesIn(n.seq1Range),a=n.seq1Range.length,l=t.countLinesIn(n.seq2Range),c=n.seq2Range.length,d=e.countLinesIn(i.seq1Range),g=i.seq1Range.length,f=t.countLinesIn(i.seq2Range),m=i.seq2Range.length;function p(e){return Math.min(e,130)}return Math.pow(Math.pow(p(40*o+a),1.5)+Math.pow(p(40*l+c),1.5),1.5)+Math.pow(Math.pow(p(40*d+g),1.5)+Math.pow(p(40*f+m),1.5),1.5)>74184.96480721243}c(u,h)?(r=!0,a[a.length-1]=a[a.length-1].join(h)):a.push(h)}i=a}while(s++<10&&r);const o=[];return(0,$.kj)(i,((t,n,i)=>{let r=n;function s(e){return e.length>0&&e.trim().length<=3&&n.seq1Range.length+n.seq2Range.length>100}const a=e.extendToFullLines(n.seq1Range),l=e.getText(new I.L(a.start,n.seq1Range.start));s(l)&&(r=r.deltaStart(-l.length));const h=e.getText(new I.L(n.seq1Range.endExclusive,a.endExclusive));s(h)&&(r=r.deltaEnd(h.length));const u=Q.fromOffsetPairs(t?t.getEndExclusives():Y.zero,i?i.getStarts():Y.max),c=r.intersect(u);o.length>0&&c.getStarts().equals(o[o.length-1].getEndExclusives())?o[o.length-1]=o[o.length-1].join(c):o.push(c)})),o}(a,l,u);return{mappings:u.map((e=>new O(a.translateRange(e.seq1Range),l.translateRange(e.seq2Range)))),hitTimeout:h.hitTimeout}}}function ve(e,t,n,i=!1){const r=[];for(const i of(0,$.n)(e.map((e=>function(e,t,n){let i=0,r=0;1===e.modifiedRange.endColumn&&1===e.originalRange.endColumn&&e.originalRange.startLineNumber+i<=e.originalRange.endLineNumber&&e.modifiedRange.startLineNumber+i<=e.modifiedRange.endLineNumber&&(r=-1),e.modifiedRange.startColumn-1>=n[e.modifiedRange.startLineNumber-1].length&&e.originalRange.startColumn-1>=t[e.originalRange.startLineNumber-1].length&&e.originalRange.startLineNumber<=e.originalRange.endLineNumber+r&&e.modifiedRange.startLineNumber<=e.modifiedRange.endLineNumber+r&&(i=1);const s=new x.M(e.originalRange.startLineNumber+i,e.originalRange.endLineNumber+1+r),o=new x.M(e.modifiedRange.startLineNumber+i,e.modifiedRange.endLineNumber+1+r);return new D(s,o,[e])}(e,t,n))),((e,t)=>e.original.overlapOrTouch(t.original)||e.modified.overlapOrTouch(t.modified)))){const e=i[0],t=i[i.length-1];r.push(new D(e.original.join(t.original),e.modified.join(t.modified),i.map((e=>e.innerChanges[0]))))}return(0,N.Ft)((()=>{if(!i&&r.length>0){if(r[0].modified.startLineNumber!==r[0].original.startLineNumber)return!1;if(n.length-r[r.length-1].modified.endLineNumberExclusive!=t.length-r[r.length-1].original.endLineNumberExclusive)return!1}return(0,N.Xo)(r,((e,t)=>t.original.startLineNumber-e.original.endLineNumberExclusive==t.modified.startLineNumber-e.modified.endLineNumberExclusive&&e.original.endLineNumberExclusive<t.original.startLineNumber&&e.modified.endLineNumberExclusive<t.modified.startLineNumber))})),r}var Le=n(1386),we=n(3072),ye=n(4901);function Se(e){const t=[];for(const n of e){const e=Number(n);(e||0===e&&""!==n.replace(/\s/g,""))&&t.push(e)}return t}function xe(e,t,n,i){return{red:e/255,blue:n/255,green:t/255,alpha:i}}function Ee(e,t){const n=t.index,i=t[0].length;if(!n)return;const r=e.positionAt(n);return{startLineNumber:r.lineNumber,startColumn:r.column,endLineNumber:r.lineNumber,endColumn:r.column+i}}function Ne(e,t){if(!e)return;const n=ye.Q1.Format.CSS.parseHex(t);return n?{range:e,color:xe(n.rgba.r,n.rgba.g,n.rgba.b,n.rgba.a)}:void 0}function Ie(e,t,n){if(!e||1!==t.length)return;const i=Se(t[0].values());return{range:e,color:xe(i[0],i[1],i[2],n?i[3]:1)}}function Te(e,t,n){if(!e||1!==t.length)return;const i=Se(t[0].values()),r=new ye.Q1(new ye.hB(i[0],i[1]/100,i[2]/100,n?i[3]:1));return{range:e,color:xe(r.rgba.r,r.rgba.g,r.rgba.b,r.rgba.a)}}function Ae(e,t){return"string"==typeof e?[...e.matchAll(t)]:e.findMatches(t)}var Re=n(9307),Me=n(1305);class De{constructor(){this._workerTextModelSyncServer=new Me.WorkerTextModelSyncServer}dispose(){}_getModel(e){return this._workerTextModelSyncServer.getModel(e)}_getModels(){return this._workerTextModelSyncServer.getModels()}$acceptNewModel(e){this._workerTextModelSyncServer.$acceptNewModel(e)}$acceptModelChanged(e,t){this._workerTextModelSyncServer.$acceptModelChanged(e,t)}$acceptRemovedModel(e){this._workerTextModelSyncServer.$acceptRemovedModel(e)}async $computeUnicodeHighlights(e,t,n){const i=this._getModel(e);return i?L.UnicodeTextModelHighlighter.computeUnicodeHighlights(i,t,n):{ranges:[],hasMore:!1,ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0}}async $findSectionHeaders(e,t){const n=this._getModel(e);return n?(0,Re.findSectionHeaders)(n,t):[]}async $computeDiff(e,t,n,i){const r=this._getModel(e),s=this._getModel(t);return r&&s?Oe.computeDiff(r,s,n,i):null}static computeDiff(e,t,n,i){const r="advanced"===i?new Ce:new F,s=e.getLinesContent(),o=t.getLinesContent(),a=r.computeDiff(s,o,n);function l(e){return e.map((e=>[e.original.startLineNumber,e.original.endLineNumberExclusive,e.modified.startLineNumber,e.modified.endLineNumberExclusive,e.innerChanges?.map((e=>[e.originalRange.startLineNumber,e.originalRange.startColumn,e.originalRange.endLineNumber,e.originalRange.endColumn,e.modifiedRange.startLineNumber,e.modifiedRange.startColumn,e.modifiedRange.endLineNumber,e.modifiedRange.endColumn]))]))}return{identical:!(a.changes.length>0)&&this._modelsAreIdentical(e,t),quitEarly:a.hitTimeout,changes:l(a.changes),moves:a.moves.map((e=>[e.lineRangeMapping.original.startLineNumber,e.lineRangeMapping.original.endLineNumberExclusive,e.lineRangeMapping.modified.startLineNumber,e.lineRangeMapping.modified.endLineNumberExclusive,l(e.changes)]))}}static _modelsAreIdentical(e,t){const n=e.getLineCount();if(n!==t.getLineCount())return!1;for(let i=1;i<=n;i++)if(e.getLineContent(i)!==t.getLineContent(i))return!1;return!0}static{this._diffLimit=1e5}async $computeMoreMinimalEdits(e,t,n){const i=this._getModel(e);if(!i)return t;const r=[];let s;t=t.slice(0).sort(((e,t)=>e.range&&t.range?c.Q.compareRangesUsingStarts(e.range,t.range):(e.range?0:1)-(t.range?0:1)));let a=0;for(let e=1;e<t.length;e++)c.Q.getEndPosition(t[a].range).equals(c.Q.getStartPosition(t[e].range))?(t[a].range=c.Q.fromPositions(c.Q.getStartPosition(t[a].range),c.Q.getEndPosition(t[e].range)),t[a].text+=t[e].text):(a++,t[a]=t[e]);t.length=a+1;for(let{range:e,text:a,eol:l}of t){if("number"==typeof l&&(s=l),c.Q.isEmpty(e)&&!a)continue;const t=i.getValueInRange(e);if(a=a.replace(/\r\n|\n|\r/g,i.eol),t===a)continue;if(Math.max(a.length,t.length)>Oe._diffLimit){r.push({range:e,text:a});continue}const h=o(t,a,n),u=i.offsetAt(c.Q.lift(e).getStartPosition());for(const e of h){const t=i.positionAt(u+e.originalStart),n=i.positionAt(u+e.originalStart+e.originalLength),s={text:a.substr(e.modifiedStart,e.modifiedLength),range:{startLineNumber:t.lineNumber,startColumn:t.column,endLineNumber:n.lineNumber,endColumn:n.column}};i.getValueInRange(s.range)!==s.text&&r.push(s)}}return"number"==typeof s&&r.push({eol:s,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),r}async $computeLinks(e){const t=this._getModel(e);return t?function(e){return e&&"function"==typeof e.getLineCount&&"function"==typeof e.getLineContent?_.computeLinks(e):[]}(t):null}async $computeDefaultDocumentColors(e){const t=this._getModel(e);return t?function(e){return e&&"function"==typeof e.getValue&&"function"==typeof e.positionAt?function(e){const t=[],n=Ae(e,/\b(rgb|rgba|hsl|hsla)(\([0-9\s,.\%]*\))|(#)([A-Fa-f0-9]{3})\b|(#)([A-Fa-f0-9]{4})\b|(#)([A-Fa-f0-9]{6})\b|(#)([A-Fa-f0-9]{8})\b/gm);if(n.length>0)for(const i of n){const n=i.filter((e=>void 0!==e)),r=n[1],s=n[2];if(!s)continue;let o;if("rgb"===r){const t=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*\)$/gm;o=Ie(Ee(e,i),Ae(s,t),!1)}else if("rgba"===r){const t=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;o=Ie(Ee(e,i),Ae(s,t),!0)}else if("hsl"===r){const t=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*\)$/gm;o=Te(Ee(e,i),Ae(s,t),!1)}else if("hsla"===r){const t=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;o=Te(Ee(e,i),Ae(s,t),!0)}else"#"===r&&(o=Ne(Ee(e,i),r+s));o&&t.push(o)}return t}(e):[]}(t):null}static{this._suggestionsLimit=1e4}async $textualSuggest(e,t,n,i){const r=new v.W,s=new RegExp(n,i),o=new Set;e:for(const n of e){const e=this._getModel(n);if(e)for(const n of e.words(s))if(n!==t&&isNaN(Number(n))&&(o.add(n),o.size>Oe._suggestionsLimit))break e}return{words:Array.from(o),duration:r.elapsed()}}async $computeWordRanges(e,t,n,i){const r=this._getModel(e);if(!r)return Object.create(null);const s=new RegExp(n,i),o=Object.create(null);for(let e=t.startLineNumber;e<t.endLineNumber;e++){const t=r.getLineWords(e,s);for(const n of t){if(!isNaN(Number(n.word)))continue;let t=o[n.word];t||(t=[],o[n.word]=t),t.push({startLineNumber:e,startColumn:n.startColumn,endLineNumber:e,endColumn:n.endColumn})}}return o}async $navigateValueSet(e,t,n,i,r){const s=this._getModel(e);if(!s)return null;const o=new RegExp(i,r);t.startColumn===t.endColumn&&(t={startLineNumber:t.startLineNumber,startColumn:t.startColumn,endLineNumber:t.endLineNumber,endColumn:t.endColumn+1});const a=s.getValueInRange(t),l=s.getWordAtPosition({lineNumber:t.startLineNumber,column:t.startColumn},o);if(!l)return null;const h=s.getValueInRange(l);return b.INSTANCE.navigateValueSet(t,a,l,h,n)}}class Oe extends De{constructor(e,t){super(),this._host=e,this._foreignModuleFactory=t,this._foreignModule=null}async $ping(){return"pong"}$loadForeignModule(e,t,i){const r={host:(0,Le.kT)(i,((e,t)=>this._host.$fhr(e,t))),getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(r,t),Promise.resolve((0,Le.V0)(this._foreignModule))):new Promise(((i,s)=>{const o=e=>{this._foreignModule=e.create(r,t),i((0,Le.V0)(this._foreignModule))};{const t=we.zl.asBrowserUri(`${e}.js`).toString(!0);n(9204)(`${t}`).then(o).catch(s)}}))}$fmr(e,t){if(!this._foreignModule||"function"!=typeof this._foreignModule[e])return Promise.reject(new Error("Missing requestHandler or method: "+e));try{return Promise.resolve(this._foreignModule[e].apply(this._foreignModule,t))}catch(e){return Promise.reject(e)}}}function Be(e){return new Oe(C.EditorWorkerHost.getChannel(e),null)}"function"==typeof importScripts&&(globalThis.monaco=(0,k.createMonacoBaseAPI)())},304:(e,t,n)=>{"use strict";n.r(t),n.d(t,{IEditorWorkerService:()=>i});const i=(0,n(2399).u1)("editorWorkerService")},6358:(e,t,n)=>{"use strict";n.r(t),n.d(t,{EditorWorkerHost:()=>i});class i{static{this.CHANNEL_NAME="editorWorkerHost"}static getChannel(e){return e.getChannel(i.CHANNEL_NAME)}static setChannel(e,t){e.setChannel(i.CHANNEL_NAME,t)}}},9307:(e,t,n)=>{"use strict";n.r(t),n.d(t,{findSectionHeaders:()=>s});const i=new RegExp("\\bMARK:\\s*(.*)$","d"),r=/^-+|-+$/g;function s(e,t){let n=[];if(t.findRegionSectionHeaders&&t.foldingRules?.markers){const i=function(e,t){const n=[],i=e.getLineCount();for(let r=1;r<=i;r++){const i=e.getLineContent(r),s=i.match(t.foldingRules.markers.start);if(s){const e={startLineNumber:r,startColumn:s[0].length+1,endLineNumber:r,endColumn:i.length+1};if(e.endColumn>e.startColumn){const t={range:e,...a(i.substring(s[0].length)),shouldBeInComments:!1};(t.text||t.hasSeparatorLine)&&n.push(t)}}}return n}(e,t);n=n.concat(i)}if(t.findMarkSectionHeaders){const t=function(e){const t=[],n=e.getLineCount();for(let i=1;i<=n;i++)o(e.getLineContent(i),i,t);return t}(e);n=n.concat(t)}return n}function o(e,t,n){i.lastIndex=0;const r=i.exec(e);if(r){const e={startLineNumber:t,startColumn:r.indices[1][0]+1,endLineNumber:t,endColumn:r.indices[1][1]+1};if(e.endColumn>e.startColumn){const t={range:e,...a(r[1]),shouldBeInComments:!0};(t.text||t.hasSeparatorLine)&&n.push(t)}}}function a(e){const t=(e=e.trim()).startsWith("-");return{text:e=e.replace(r,""),hasSeparatorLine:t}}},7762:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getIconClasses:()=>d});var i,r=n(3072),s=n(2467),o=n(7264),a=n(4957);!function(e){e[e.FILE=0]="FILE",e[e.FOLDER=1]="FOLDER",e[e.ROOT_FOLDER=2]="ROOT_FOLDER"}(i||(i={}));var l,h,u=n(1869);!function(e){e.isThemeColor=function(e){return e&&"object"==typeof e&&"string"==typeof e.id}}(l||(l={})),function(e){e.iconNameSegment="[A-Za-z0-9]+",e.iconNameExpression="[A-Za-z0-9-]+",e.iconModifierExpression="~[A-Za-z]+",e.iconNameCharacter="[A-Za-z0-9~-]";const t=new RegExp(`^(${e.iconNameExpression})(${e.iconModifierExpression})?$`);function n(e){const i=t.exec(e.id);if(!i)return n(u.W.error);const[,r,s]=i,o=["codicon","codicon-"+r];return s&&o.push("codicon-modifier-"+s.substring(1)),o}e.asClassNameArray=n,e.asClassName=function(e){return n(e).join(" ")},e.asCSSSelector=function(e){return"."+n(e).join(".")},e.isThemeIcon=function(e){return e&&"object"==typeof e&&"string"==typeof e.id&&(void 0===e.color||l.isThemeColor(e.color))};const i=new RegExp(`^\\$\\((${e.iconNameExpression}(?:${e.iconModifierExpression})?)\\)$`);e.fromString=function(e){const t=i.exec(e);if(!t)return;const[,n]=t;return{id:n}},e.fromId=function(e){return{id:e}},e.modify=function(e,t){let n=e.id;const i=n.lastIndexOf("~");return-1!==i&&(n=n.substring(0,i)),t&&(n=`${n}~${t}`),{id:n}},e.getModifier=function(e){const t=e.id.lastIndexOf("~");if(-1!==t)return e.id.substring(t+1)},e.isEqual=function(e,t){return e.id===t.id&&e.color?.id===t.color?.id}}(h||(h={}));const c=/(?:\/|^)(?:([^\/]+)\/)?([^\/]+)$/;function d(e,t,n,l,u){if(h.isThemeIcon(u))return[`codicon-${u.id}`,"predefined-file-icon"];if(o.r.isUri(u))return[];const d=l===i.ROOT_FOLDER?["rootfolder-icon"]:l===i.FOLDER?["folder-icon"]:["file-icon"];if(n){let o;if(n.scheme===r.ny.data)o=s.B6.parseMetaData(n).get(s.B6.META_DATA_LABEL);else{const e=n.path.match(c);e?(o=g(e[2].toLowerCase()),e[1]&&d.push(`${g(e[1].toLowerCase())}-name-dir-icon`)):o=g(n.authority.toLowerCase())}if(l===i.ROOT_FOLDER)d.push(`${o}-root-name-folder-icon`);else if(l===i.FOLDER)d.push(`${o}-name-folder-icon`);else{if(o){if(d.push(`${o}-name-file-icon`),d.push("name-file-icon"),o.length<=255){const e=o.split(".");for(let t=1;t<e.length;t++)d.push(`${e.slice(t).join(".")}-ext-file-icon`)}d.push("ext-file-icon")}const i=function(e,t,n){if(!n)return null;let i=null;if(n.scheme===r.ny.data){const e=s.B6.parseMetaData(n).get(s.B6.META_DATA_MIME);e&&(i=t.getLanguageIdByMimeType(e))}else{const t=e.getModel(n);t&&(i=t.getLanguageId())}return i&&i!==a.vH?i:t.guessLanguageIdByFilepathOrFirstLine(n)}(e,t,n);i&&d.push(`${g(i)}-lang-file-icon`)}}return d}function g(e){return e.replace(/[\s]/g,"/")}},4791:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ILanguageFeatureDebounceService:()=>f,LanguageFeatureDebounceService:()=>b});var i=n(2344),r=n(7992);function s(e,t,n){return Math.min(Math.max(e,t),n)}class o{constructor(){this._n=1,this._val=0}update(e){return this._val=this._val+(e-this._val)/this._n,this._n+=1,this._val}get value(){return this._val}}class a{constructor(e){this._n=0,this._val=0,this._values=[],this._index=0,this._sum=0,this._values=new Array(e),this._values.fill(0,0,e)}update(e){const t=this._values[this._index];return this._values[this._index]=e,this._index=(this._index+1)%this._values.length,this._sum-=t,this._sum+=e,this._n<this._values.length&&(this._n+=1),this._val=this._sum/this._n,this._val}get value(){return this._val}}var l=n(2399);const h=(0,l.u1)("environmentService");var u=n(9031),c=n(9950),d=n(3072),g=function(e,t){return function(n,i){t(n,i,e)}};const f=(0,l.u1)("ILanguageFeatureDebounceService");var m;!function(e){const t=new WeakMap;let n=0;e.of=function(e){let i=t.get(e);return void 0===i&&(i=++n,t.set(e,i)),i}}(m||(m={}));class p{constructor(e){this._default=e}get(e){return this._default}update(e,t){return this._default}default(){return this._default}}class _{constructor(e,t,n,i,s,o){this._logService=e,this._name=t,this._registry=n,this._default=i,this._min=s,this._max=o,this._cache=new r.qK(50,.7)}_key(e){return e.id+this._registry.all(e).reduce(((e,t)=>(0,i.sN)(m.of(t),e)),0)}get(e){const t=this._key(e),n=this._cache.get(t);return n?s(n.value,this._min,this._max):this.default()}update(e,t){const n=this._key(e);let i=this._cache.get(n);i||(i=new a(6),this._cache.set(n,i));const r=s(i.update(t),this._min,this._max);return(0,d.v$)(e.uri,"output")||this._logService.trace(`[DEBOUNCE: ${this._name}] for ${e.uri.toString()} is ${r}ms`),r}_overall(){const e=new o;for(const[,t]of this._cache)e.update(t.value);return e.value}default(){return s(0|this._overall()||this._default,this._min,this._max)}}let b=class{constructor(e,t){this._logService=e,this._data=new Map,this._isDev=t.isExtensionDevelopment||!t.isBuilt}for(e,t,n){const i=n?.min??50,r=n?.max??i**2,s=n?.key??void 0,o=`${m.of(e)},${i}${s?","+s:""}`;let a=this._data.get(o);return a||(this._isDev?(this._logService.debug(`[DEBOUNCE: ${t}] is disabled in developed mode`),a=new p(1.5*i)):a=new _(this._logService,t,e,0|this._overallAverage()||1.5*i,i,r),this._data.set(o,a)),a}_overallAverage(){const e=new o;for(const t of this._data.values())e.update(t.default());return e.value}};b=function(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([g(0,c.rr),g(1,h)],b),(0,u.v)(f,b,1)},2230:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ILanguageFeaturesService:()=>i});const i=(0,n(2399).u1)("ILanguageFeaturesService")},501:(e,t,n)=>{"use strict";n.r(t),n.d(t,{LanguageFeaturesService:()=>m});var i=n(2106),r=n(9235),s=n(6055),o=n(3958),a=n(4033);function l(e,t,n,i,r,s){if(Array.isArray(e)){let o=0;for(const a of e){const e=l(a,t,n,i,r,s);if(10===e)return e;e>o&&(o=e)}return o}if("string"==typeof e)return i?"*"===e?5:e===n?10:0:0;if(e){const{language:l,pattern:h,scheme:u,hasAccessToAllModels:c,notebookType:d}=e;if(!i&&!c)return 0;d&&r&&(t=r);let g=0;if(u)if(u===t.scheme)g=10;else{if("*"!==u)return 0;g=5}if(l)if(l===n)g=10;else{if("*"!==l)return 0;g=Math.max(g,5)}if(d)if(d===s)g=10;else{if("*"!==d||void 0===s)return 0;g=Math.max(g,5)}if(h){let e;if(e="string"==typeof h?h:{...h,base:(0,a.S8)(h.base)},e!==t.fsPath&&!(0,o.YW)(e,t.fsPath))return 0;g=10}return g}return 0}function h(e){return"string"!=typeof e&&(Array.isArray(e)?e.every(h):!!e.exclusive)}class u{constructor(e,t,n,i,r){this.uri=e,this.languageId=t,this.notebookUri=n,this.notebookType=i,this.recursive=r}equals(e){return this.notebookType===e.notebookType&&this.languageId===e.languageId&&this.uri.toString()===e.uri.toString()&&this.notebookUri?.toString()===e.notebookUri?.toString()&&this.recursive===e.recursive}}class c{constructor(e){this._notebookInfoResolver=e,this._clock=0,this._entries=[],this._onDidChange=new i.vl,this.onDidChange=this._onDidChange.event}register(e,t){let n={selector:e,provider:t,_score:-1,_time:this._clock++};return this._entries.push(n),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),(0,r.s)((()=>{if(n){const e=this._entries.indexOf(n);e>=0&&(this._entries.splice(e,1),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),n=void 0)}}))}has(e){return this.all(e).length>0}all(e){if(!e)return[];this._updateScores(e,!1);const t=[];for(const e of this._entries)e._score>0&&t.push(e.provider);return t}ordered(e,t=!1){const n=[];return this._orderedForEach(e,t,(e=>n.push(e.provider))),n}orderedGroups(e){const t=[];let n,i;return this._orderedForEach(e,!1,(e=>{n&&i===e._score?n.push(e.provider):(i=e._score,n=[e.provider],t.push(n))})),t}_orderedForEach(e,t,n){this._updateScores(e,t);for(const e of this._entries)e._score>0&&n(e)}_updateScores(e,t){const n=this._notebookInfoResolver?.(e.uri),i=n?new u(e.uri,e.getLanguageId(),n.uri,n.type,t):new u(e.uri,e.getLanguageId(),void 0,void 0,t);if(!this._lastCandidate?.equals(i)){this._lastCandidate=i;for(const n of this._entries)if(n._score=l(n.selector,i.uri,i.languageId,(0,s.vd)(e),i.notebookUri,i.notebookType),h(n.selector)&&n._score>0){if(!t){for(const e of this._entries)e._score=0;n._score=1e3;break}n._score=0}this._entries.sort(c._compareByScoreAndTime)}}static _compareByScoreAndTime(e,t){return e._score<t._score?1:e._score>t._score?-1:d(e.selector)&&!d(t.selector)?1:!d(e.selector)&&d(t.selector)?-1:e._time<t._time?1:e._time>t._time?-1:0}}function d(e){return"string"!=typeof e&&(Array.isArray(e)?e.some(d):Boolean(e.isBuiltin))}var g=n(2230),f=n(9031);class m{constructor(){this.referenceProvider=new c(this._score.bind(this)),this.renameProvider=new c(this._score.bind(this)),this.newSymbolNamesProvider=new c(this._score.bind(this)),this.codeActionProvider=new c(this._score.bind(this)),this.definitionProvider=new c(this._score.bind(this)),this.typeDefinitionProvider=new c(this._score.bind(this)),this.declarationProvider=new c(this._score.bind(this)),this.implementationProvider=new c(this._score.bind(this)),this.documentSymbolProvider=new c(this._score.bind(this)),this.inlayHintsProvider=new c(this._score.bind(this)),this.colorProvider=new c(this._score.bind(this)),this.codeLensProvider=new c(this._score.bind(this)),this.documentFormattingEditProvider=new c(this._score.bind(this)),this.documentRangeFormattingEditProvider=new c(this._score.bind(this)),this.onTypeFormattingEditProvider=new c(this._score.bind(this)),this.signatureHelpProvider=new c(this._score.bind(this)),this.hoverProvider=new c(this._score.bind(this)),this.documentHighlightProvider=new c(this._score.bind(this)),this.multiDocumentHighlightProvider=new c(this._score.bind(this)),this.selectionRangeProvider=new c(this._score.bind(this)),this.foldingRangeProvider=new c(this._score.bind(this)),this.linkProvider=new c(this._score.bind(this)),this.inlineCompletionsProvider=new c(this._score.bind(this)),this.inlineEditProvider=new c(this._score.bind(this)),this.completionProvider=new c(this._score.bind(this)),this.linkedEditingRangeProvider=new c(this._score.bind(this)),this.documentRangeSemanticTokensProvider=new c(this._score.bind(this)),this.documentSemanticTokensProvider=new c(this._score.bind(this)),this.documentDropEditProvider=new c(this._score.bind(this)),this.documentPasteEditProvider=new c(this._score.bind(this))}_score(e){return this._notebookTypeResolver?.(e)}}(0,f.v)(g.ILanguageFeaturesService,m,1)},6123:(e,t,n)=>{"use strict";n.r(t),n.d(t,{LanguageService:()=>I});var i=n(2106),r=n(9235),s=n(6995),o=n(3338),a=n(4364),l=n(4957);const h=(e,t)=>e===t;new WeakMap;class u{constructor(e,t,n){this.owner=e,this.debugNameSource=t,this.referenceFn=n}getDebugName(e){return function(e,t){const n=d.get(e);if(n)return n;const i=function(e,t){const n=d.get(e);if(n)return n;const i=t.owner?function(e){const t=f.get(e);if(t)return t;const n=function(e){const t=e.constructor;return t?t.name:"Object"}(e);let i=g.get(n)??0;i++,g.set(n,i);const r=1===i?n:`${n}#${i}`;return f.set(e,r),r}(t.owner)+".":"";let r;const s=t.debugNameSource;if(void 0!==s){if("function"!=typeof s)return i+s;if(r=s(),void 0!==r)return i+r}const o=t.referenceFn;if(void 0!==o&&(r=m(o),void 0!==r))return i+r;if(void 0!==t.owner){const n=function(e,t){for(const n in e)if(e[n]===t)return n}(t.owner,e);if(void 0!==n)return i+n}}(e,t);if(i){let t=c.get(i)??0;t++,c.set(i,t);const n=1===t?i:`${i}#${t}`;return d.set(e,n),n}}(e,this)}}const c=new Map,d=new WeakMap,g=new Map,f=new WeakMap;function m(e){const t=e.toString(),n=/\/\*\*\s*@description\s*([^*]*)\*\//.exec(t),i=n?n[1]:void 0;return i?.trim()}let p,_,b;class k{get TChange(){return null}reportChanges(){this.get()}read(e){return e?e.readObservable(this):this.get()}map(e,t){const n=void 0===t?void 0:e,i=void 0===t?e:t;return b({owner:n,debugName:()=>{const e=m(i);if(void 0!==e)return e;const t=/^\s*\(?\s*([a-zA-Z_$][a-zA-Z_$0-9]*)\s*\)?\s*=>\s*\1(?:\??)\.([a-zA-Z_$][a-zA-Z_$0-9]*)\s*$/.exec(i.toString());return t?`${this.debugName}.${t[2]}`:n?void 0:`${this.debugName} (mapped)`},debugReferenceFn:i},(e=>i(this.read(e),e)))}flatten(){return b({owner:void 0,debugName:()=>`${this.debugName} (flattened)`},(e=>this.read(e).read(e)))}recomputeInitiallyAndOnChange(e,t){return e.add(p(this,t)),this}keepObserved(e){return e.add(_(this)),this}}class C extends k{constructor(){super(...arguments),this.observers=new Set}addObserver(e){const t=this.observers.size;this.observers.add(e),0===t&&this.onFirstObserverAdded()}removeObserver(e){this.observers.delete(e)&&0===this.observers.size&&this.onLastObserverRemoved()}onFirstObserverAdded(){}onLastObserverRemoved(){}}class v{constructor(e,t){this._fn=e,this._getDebugName=t,this.updatingObservers=[]}getDebugName(){return this._getDebugName?this._getDebugName():m(this._fn)}updateObserver(e,t){this.updatingObservers.push({observer:e,observable:t}),e.beginUpdate(t)}finish(){const e=this.updatingObservers;for(let t=0;t<e.length;t++){const{observer:n,observable:i}=e[t];n.endUpdate(i)}this.updatingObservers=null}}var L=n(7110);b=function(e,t){return new w(new u(e.owner,e.debugName,e.debugReferenceFn),t,void 0,void 0,e.onLastObserverRemoved,e.equalsFn??h)};class w extends C{get debugName(){return this._debugNameData.getDebugName(this)??"(anonymous)"}constructor(e,t,n,i,r=void 0,s){super(),this._debugNameData=e,this._computeFn=t,this.createChangeSummary=n,this._handleChange=i,this._handleLastObserverRemoved=r,this._equalityComparator=s,this.state=0,this.value=void 0,this.updateCount=0,this.dependencies=new Set,this.dependenciesToBeRemoved=new Set,this.changeSummary=void 0,this.changeSummary=this.createChangeSummary?.()}onLastObserverRemoved(){this.state=0,this.value=void 0;for(const e of this.dependencies)e.removeObserver(this);this.dependencies.clear(),this._handleLastObserverRemoved?.()}get(){if(0===this.observers.size){const e=this._computeFn(this,this.createChangeSummary?.());return this.onLastObserverRemoved(),e}do{if(1===this.state)for(const e of this.dependencies)if(e.reportChanges(),2===this.state)break;1===this.state&&(this.state=3),this._recomputeIfNeeded()}while(3!==this.state);return this.value}_recomputeIfNeeded(){if(3===this.state)return;const e=this.dependenciesToBeRemoved;this.dependenciesToBeRemoved=this.dependencies,this.dependencies=e;const t=0!==this.state,n=this.value;this.state=3;const i=this.changeSummary;this.changeSummary=this.createChangeSummary?.();try{this.value=this._computeFn(this,i)}finally{for(const e of this.dependenciesToBeRemoved)e.removeObserver(this);this.dependenciesToBeRemoved.clear()}const r=t&&!this._equalityComparator(n,this.value);if(r)for(const e of this.observers)e.handleChange(this,void 0)}toString(){return`LazyDerived<${this.debugName}>`}beginUpdate(e){this.updateCount++;const t=1===this.updateCount;if(3===this.state&&(this.state=1,!t))for(const e of this.observers)e.handlePossibleChange(this);if(t)for(const e of this.observers)e.beginUpdate(this)}endUpdate(e){if(this.updateCount--,0===this.updateCount){const e=[...this.observers];for(const t of e)t.endUpdate(this)}(0,L.Ft)((()=>this.updateCount>=0))}handlePossibleChange(e){if(3===this.state&&this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)){this.state=1;for(const e of this.observers)e.handlePossibleChange(this)}}handleChange(e,t){if(this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)){const n=!this._handleChange||this._handleChange({changedObservable:e,change:t,didChange:t=>t===e},this.changeSummary),i=3===this.state;if(n&&(1===this.state||i)&&(this.state=2,i))for(const e of this.observers)e.handlePossibleChange(this)}}readObservable(e){e.addObserver(this);const t=e.get();return this.dependencies.add(e),this.dependenciesToBeRemoved.delete(e),t}addObserver(e){const t=!this.observers.has(e)&&this.updateCount>0;super.addObserver(e),t&&e.beginUpdate(this)}removeObserver(e){const t=this.observers.has(e)&&this.updateCount>0;super.removeObserver(e),t&&e.endUpdate(this)}}function y(e){return new S(new u(void 0,void 0,e),e,void 0,void 0)}class S{get debugName(){return this._debugNameData.getDebugName(this)??"(anonymous)"}constructor(e,t,n,i){this._debugNameData=e,this._runFn=t,this.createChangeSummary=n,this._handleChange=i,this.state=2,this.updateCount=0,this.disposed=!1,this.dependencies=new Set,this.dependenciesToBeRemoved=new Set,this.changeSummary=this.createChangeSummary?.(),this._runIfNeeded(),(0,r.Ay)(this)}dispose(){this.disposed=!0;for(const e of this.dependencies)e.removeObserver(this);this.dependencies.clear(),(0,r.VD)(this)}_runIfNeeded(){if(3===this.state)return;const e=this.dependenciesToBeRemoved;this.dependenciesToBeRemoved=this.dependencies,this.dependencies=e,this.state=3;const t=this.disposed;try{if(!t){const e=this.changeSummary;this.changeSummary=this.createChangeSummary?.(),this._runFn(this,e)}}finally{for(const e of this.dependenciesToBeRemoved)e.removeObserver(this);this.dependenciesToBeRemoved.clear()}}toString(){return`Autorun<${this.debugName}>`}beginUpdate(){3===this.state&&(this.state=1),this.updateCount++}endUpdate(){if(1===this.updateCount)do{if(1===this.state){this.state=3;for(const e of this.dependencies)if(e.reportChanges(),2===this.state)break}this._runIfNeeded()}while(3!==this.state);this.updateCount--,(0,L.Ft)((()=>this.updateCount>=0))}handlePossibleChange(e){3===this.state&&this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)&&(this.state=1)}handleChange(e,t){this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)&&(!this._handleChange||this._handleChange({changedObservable:e,change:t,didChange:t=>t===e},this.changeSummary))&&(this.state=2)}readObservable(e){if(this.disposed)return e.get();e.addObserver(this);const t=e.get();return this.dependencies.add(e),this.dependenciesToBeRemoved.delete(e),t}}function x(...e){let t,n,i;return 3===e.length?[t,n,i]=e:[n,i]=e,new E(new u(t,void 0,i),n,i,(()=>E.globalTransaction),h)}(y||(y={})).Observer=S;class E extends C{constructor(e,t,n,i,r){super(),this._debugNameData=e,this.event=t,this._getValue=n,this._getTransaction=i,this._equalityComparator=r,this.hasValue=!1,this.handleEvent=e=>{const t=this._getValue(e),n=this.value,i=!this.hasValue||!this._equalityComparator(n,t);let r=!1;var s,o,a;i&&(this.value=t,this.hasValue&&(r=!0,s=this._getTransaction(),o=e=>{for(const t of this.observers)e.updateObserver(t,this),t.handleChange(this,void 0)},a=()=>{const e=this.getDebugName();return"Event fired"+(e?`: ${e}`:"")},s?o(s):function(e,t){const n=new v(e,t);try{e(n)}finally{n.finish()}}(o,a)),this.hasValue=!0)}}getDebugName(){return this._debugNameData.getDebugName(this)}get debugName(){const e=this.getDebugName();return"From Event"+(e?`: ${e}`:"")}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0,this.hasValue=!1,this.value=void 0}get(){return this.subscription?(this.hasValue||this.handleEvent(void 0),this.value):this._getValue(void 0)}}!function(e){e.Observer=E,e.batchEventsGlobally=function(e,t){let n=!1;void 0===E.globalTransaction&&(E.globalTransaction=e,n=!0);try{t()}finally{n&&(E.globalTransaction=void 0)}}}(x||(x={})),_=function(e){const t=new N(!1,void 0);return e.addObserver(t),(0,r.s)((()=>{e.removeObserver(t)}))},p=function(e,t){const n=new N(!0,t);return e.addObserver(n),t?t(e.get()):e.reportChanges(),(0,r.s)((()=>{e.removeObserver(n)}))};class N{constructor(e,t){this._forceRecompute=e,this._handleValue=t,this._counter=0}beginUpdate(e){this._counter++}endUpdate(e){this._counter--,0===this._counter&&this._forceRecompute&&(this._handleValue?this._handleValue(e.get()):e.reportChanges())}handlePossibleChange(e){}handleChange(e,t){}}n(4327);class I extends r.jG{static{this.instanceCount=0}constructor(e=!1){super(),this._onDidRequestBasicLanguageFeatures=this._register(new i.vl),this.onDidRequestBasicLanguageFeatures=this._onDidRequestBasicLanguageFeatures.event,this._onDidRequestRichLanguageFeatures=this._register(new i.vl),this.onDidRequestRichLanguageFeatures=this._onDidRequestRichLanguageFeatures.event,this._onDidChange=this._register(new i.vl({leakWarningThreshold:200})),this.onDidChange=this._onDidChange.event,this._requestedBasicLanguages=new Set,this._requestedRichLanguages=new Set,I.instanceCount++,this._registry=this._register(new s.LanguagesRegistry(!0,e)),this.languageIdCodec=this._registry.languageIdCodec,this._register(this._registry.onDidChange((()=>this._onDidChange.fire())))}dispose(){I.instanceCount--,super.dispose()}isRegisteredLanguageId(e){return this._registry.isRegisteredLanguageId(e)}getLanguageIdByLanguageName(e){return this._registry.getLanguageIdByLanguageName(e)}getLanguageIdByMimeType(e){return this._registry.getLanguageIdByMimeType(e)}guessLanguageIdByFilepathOrFirstLine(e,t){const n=this._registry.guessLanguageIdByFilepathOrFirstLine(e,t);return(0,o.Fy)(n,null)}createById(e){return new T(this.onDidChange,(()=>this._createAndGetLanguageIdentifier(e)))}createByFilepathOrFirstLine(e,t){return new T(this.onDidChange,(()=>{const n=this.guessLanguageIdByFilepathOrFirstLine(e,t);return this._createAndGetLanguageIdentifier(n)}))}_createAndGetLanguageIdentifier(e){return e&&this.isRegisteredLanguageId(e)||(e=l.vH),e}requestBasicLanguageFeatures(e){this._requestedBasicLanguages.has(e)||(this._requestedBasicLanguages.add(e),this._onDidRequestBasicLanguageFeatures.fire(e))}requestRichLanguageFeatures(e){this._requestedRichLanguages.has(e)||(this._requestedRichLanguages.add(e),this.requestBasicLanguageFeatures(e),a.dG.getOrCreate(e),this._onDidRequestRichLanguageFeatures.fire(e))}}class T{constructor(e,t){this._value=x(this,e,(()=>t())),this.onDidChange=i.Jh.fromObservable(this._value)}get languageId(){return this._value.get()}}},5996:(e,t,n)=>{"use strict";n.r(t),n.d(t,{clearPlatformLanguageAssociations:()=>f,getLanguageIds:()=>m,registerPlatformLanguageAssociation:()=>g});var i=n(3958),r=n(3720),s=n(3072),o=n(4033),a=n(2467),l=n(6844),h=n(4957);let u=[],c=[],d=[];function g(e,t=!1){!function(e,t,n){const r=function(e){return{id:e.id,mime:e.mime,filename:e.filename,extension:e.extension,filepattern:e.filepattern,firstline:e.firstline,userConfigured:false,filenameLowercase:e.filename?e.filename.toLowerCase():void 0,extensionLowercase:e.extension?e.extension.toLowerCase():void 0,filepatternLowercase:e.filepattern?(0,i.qg)(e.filepattern.toLowerCase()):void 0,filepatternOnPath:!!e.filepattern&&e.filepattern.indexOf(o.SA.sep)>=0}}(e);u.push(r),r.userConfigured?d.push(r):c.push(r),n&&!r.userConfigured&&u.forEach((e=>{e.mime===r.mime||e.userConfigured||(r.extension&&e.extension===r.extension&&console.warn(`Overwriting extension <<${r.extension}>> to now point to mime <<${r.mime}>>`),r.filename&&e.filename===r.filename&&console.warn(`Overwriting filename <<${r.filename}>> to now point to mime <<${r.mime}>>`),r.filepattern&&e.filepattern===r.filepattern&&console.warn(`Overwriting filepattern <<${r.filepattern}>> to now point to mime <<${r.mime}>>`),r.firstline&&e.firstline===r.firstline&&console.warn(`Overwriting firstline <<${r.firstline}>> to now point to mime <<${r.mime}>>`))}))}(e,0,t)}function f(){u=u.filter((e=>e.userConfigured)),c=[]}function m(e,t){return function(e,t){let n;if(e)switch(e.scheme){case s.ny.file:n=e.fsPath;break;case s.ny.data:n=a.B6.parseMetaData(e).get(a.B6.META_DATA_LABEL);break;case s.ny.vscodeNotebookCell:n=void 0;break;default:n=e.path}if(!n)return[{id:"unknown",mime:r.K.unknown}];n=n.toLowerCase();const i=(0,o.P8)(n),g=p(n,i,d);if(g)return[g,{id:h.vH,mime:r.K.text}];const f=p(n,i,c);if(f)return[f,{id:h.vH,mime:r.K.text}];if(t){const e=function(e){if((0,l.LU)(e)&&(e=e.substr(1)),e.length>0)for(let t=u.length-1;t>=0;t--){const n=u[t];if(!n.firstline)continue;const i=e.match(n.firstline);if(i&&i.length>0)return n}}(t);if(e)return[e,{id:h.vH,mime:r.K.text}]}return[{id:"unknown",mime:r.K.unknown}]}(e,t).map((e=>e.id))}function p(e,t,n){let i,r,s;for(let o=n.length-1;o>=0;o--){const a=n[o];if(t===a.filenameLowercase){i=a;break}if(a.filepattern&&(!r||a.filepattern.length>r.filepattern.length)){const n=a.filepatternOnPath?e:t;a.filepatternLowercase?.(n)&&(r=a)}a.extension&&(!s||a.extension.length>s.extension.length)&&t.endsWith(a.extensionLowercase)&&(s=a)}return i||r||s||void 0}},6995:(e,t,n)=>{"use strict";n.r(t),n.d(t,{LanguageIdCodec:()=>d,LanguagesRegistry:()=>g});var i=n(2106),r=n(9235),s=n(6844),o=n(5996),a=n(4957),l=n(7142),h=n(7167);const u=Object.prototype.hasOwnProperty,c="vs.editor.nullLanguage";class d{constructor(){this._languageIdToLanguage=[],this._languageToLanguageId=new Map,this._register(c,0),this._register(a.vH,1),this._nextLanguageId=2}_register(e,t){this._languageIdToLanguage[t]=e,this._languageToLanguageId.set(e,t)}register(e){if(this._languageToLanguageId.has(e))return;const t=this._nextLanguageId++;this._register(e,t)}encodeLanguageId(e){return this._languageToLanguageId.get(e)||0}decodeLanguageId(e){return this._languageIdToLanguage[e]||c}}class g extends r.jG{static{this.instanceCount=0}constructor(e=!0,t=!1){super(),this._onDidChange=this._register(new i.vl),this.onDidChange=this._onDidChange.event,g.instanceCount++,this._warnOnOverwrite=t,this.languageIdCodec=new d,this._dynamicLanguages=[],this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},e&&(this._initializeFromRegistry(),this._register(a.W6.onDidChangeLanguages((e=>{this._initializeFromRegistry()}))))}dispose(){g.instanceCount--,super.dispose()}_initializeFromRegistry(){this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},(0,o.clearPlatformLanguageAssociations)();const e=[].concat(a.W6.getLanguages()).concat(this._dynamicLanguages);this._registerLanguages(e)}_registerLanguages(e){for(const t of e)this._registerLanguage(t);this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},Object.keys(this._languages).forEach((e=>{const t=this._languages[e];t.name&&(this._nameMap[t.name]=t.identifier),t.aliases.forEach((e=>{this._lowercaseNameMap[e.toLowerCase()]=t.identifier})),t.mimetypes.forEach((e=>{this._mimeTypesMap[e]=t.identifier}))})),h.O.as(l.Fd.Configuration).registerOverrideIdentifiers(this.getRegisteredLanguageIds()),this._onDidChange.fire()}_registerLanguage(e){const t=e.id;let n;u.call(this._languages,t)?n=this._languages[t]:(this.languageIdCodec.register(t),n={identifier:t,name:null,mimetypes:[],aliases:[],extensions:[],filenames:[],configurationFiles:[],icons:[]},this._languages[t]=n),this._mergeLanguage(n,e)}_mergeLanguage(e,t){const n=t.id;let i=null;if(Array.isArray(t.mimetypes)&&t.mimetypes.length>0&&(e.mimetypes.push(...t.mimetypes),i=t.mimetypes[0]),i||(i=`text/x-${n}`,e.mimetypes.push(i)),Array.isArray(t.extensions)){t.configuration?e.extensions=t.extensions.concat(e.extensions):e.extensions=e.extensions.concat(t.extensions);for(const e of t.extensions)(0,o.registerPlatformLanguageAssociation)({id:n,mime:i,extension:e},this._warnOnOverwrite)}if(Array.isArray(t.filenames))for(const r of t.filenames)(0,o.registerPlatformLanguageAssociation)({id:n,mime:i,filename:r},this._warnOnOverwrite),e.filenames.push(r);if(Array.isArray(t.filenamePatterns))for(const e of t.filenamePatterns)(0,o.registerPlatformLanguageAssociation)({id:n,mime:i,filepattern:e},this._warnOnOverwrite);if("string"==typeof t.firstLine&&t.firstLine.length>0){let e=t.firstLine;"^"!==e.charAt(0)&&(e="^"+e);try{const t=new RegExp(e);(0,s.eY)(t)||(0,o.registerPlatformLanguageAssociation)({id:n,mime:i,firstline:t},this._warnOnOverwrite)}catch(n){console.warn(`[${t.id}]: Invalid regular expression \`${e}\`: `,n)}}e.aliases.push(n);let r=null;if(void 0!==t.aliases&&Array.isArray(t.aliases)&&(r=0===t.aliases.length?[null]:t.aliases),null!==r)for(const t of r)t&&0!==t.length&&e.aliases.push(t);const a=null!==r&&r.length>0;if(a&&null===r[0]);else{const t=(a?r[0]:null)||n;!a&&e.name||(e.name=t)}t.configuration&&e.configurationFiles.push(t.configuration),t.icon&&e.icons.push(t.icon)}isRegisteredLanguageId(e){return!!e&&u.call(this._languages,e)}getRegisteredLanguageIds(){return Object.keys(this._languages)}getLanguageIdByLanguageName(e){const t=e.toLowerCase();return u.call(this._lowercaseNameMap,t)?this._lowercaseNameMap[t]:null}getLanguageIdByMimeType(e){return e&&u.call(this._mimeTypesMap,e)?this._mimeTypesMap[e]:null}guessLanguageIdByFilepathOrFirstLine(e,t){return e||t?(0,o.getLanguageIds)(e,t):[]}}},886:(e,t,n)=>{"use strict";n.r(t),n.d(t,{IMarkerDecorationsService:()=>i});const i=(0,n(2399).u1)("markerDecorationsService")},453:(e,t,n)=>{"use strict";n.r(t),n.d(t,{MarkerDecorationsService:()=>L});var i,r=n(6844);!function(e){e[e.Ignore=0]="Ignore",e[e.Info=1]="Info",e[e.Warning=2]="Warning",e[e.Error=3]="Error"}(i||(i={})),function(e){const t="error",n="warning",i="info";e.fromValue=function(s){return s?r.Q_(t,s)?e.Error:r.Q_(n,s)||r.Q_("warn",s)?e.Warning:r.Q_(i,s)?e.Info:e.Ignore:e.Ignore},e.toString=function(r){switch(r){case e.Error:return t;case e.Warning:return n;case e.Info:return i;default:return"ignore"}}}(i||(i={}));const s=i;var o,a,l=n(9746),h=n(2399);!function(e){e[e.Hint=1]="Hint",e[e.Info=2]="Info",e[e.Warning=4]="Warning",e[e.Error=8]="Error"}(o||(o={})),function(e){e.compare=function(e,t){return t-e};const t=Object.create(null);t[e.Error]=(0,l.kg)("sev.error","Error"),t[e.Warning]=(0,l.kg)("sev.warning","Warning"),t[e.Info]=(0,l.kg)("sev.info","Info"),e.toString=function(e){return t[e]||""},e.fromSeverity=function(t){switch(t){case s.Error:return e.Error;case s.Warning:return e.Warning;case s.Info:return e.Info;case s.Ignore:return e.Hint}},e.toSeverity=function(t){switch(t){case e.Error:return s.Error;case e.Warning:return s.Warning;case e.Info:return s.Info;case e.Hint:return s.Ignore}}}(o||(o={})),function(e){const t="";function n(e,n){const i=[t];return e.source?i.push(e.source.replace("¦","\\¦")):i.push(t),e.code?"string"==typeof e.code?i.push(e.code.replace("¦","\\¦")):i.push(e.code.value.replace("¦","\\¦")):i.push(t),void 0!==e.severity&&null!==e.severity?i.push(o.toString(e.severity)):i.push(t),e.message&&n?i.push(e.message.replace("¦","\\¦")):i.push(t),void 0!==e.startLineNumber&&null!==e.startLineNumber?i.push(e.startLineNumber.toString()):i.push(t),void 0!==e.startColumn&&null!==e.startColumn?i.push(e.startColumn.toString()):i.push(t),void 0!==e.endLineNumber&&null!==e.endLineNumber?i.push(e.endLineNumber.toString()):i.push(t),void 0!==e.endColumn&&null!==e.endColumn?i.push(e.endColumn.toString()):i.push(t),i.push(t),i.join("¦")}e.makeKey=function(e){return n(e,!0)},e.makeKeyOptionalMessage=n}(a||(a={}));const u=(0,h.u1)("markerService");var c=n(9235),d=n(6055),g=n(5295),f=n(8295),m=n(4830),p=n(8061),_=n(3072),b=n(2106),k=n(61),C=n(7992),v=function(e,t){return function(n,i){t(n,i,e)}};let L=class extends c.jG{constructor(e,t){super(),this._markerService=t,this._onDidChangeMarker=this._register(new b.vl),this._markerDecorations=new C.fT,e.getModels().forEach((e=>this._onModelAdded(e))),this._register(e.onModelAdded(this._onModelAdded,this)),this._register(e.onModelRemoved(this._onModelRemoved,this)),this._register(this._markerService.onMarkerChanged(this._handleMarkerChange,this))}dispose(){super.dispose(),this._markerDecorations.forEach((e=>e.dispose())),this._markerDecorations.clear()}getMarker(e,t){const n=this._markerDecorations.get(e);return n&&n.getMarker(t)||null}_handleMarkerChange(e){e.forEach((e=>{const t=this._markerDecorations.get(e);t&&this._updateDecorations(t)}))}_onModelAdded(e){const t=new w(e);this._markerDecorations.set(e.uri,t),this._updateDecorations(t)}_onModelRemoved(e){const t=this._markerDecorations.get(e.uri);t&&(t.dispose(),this._markerDecorations.delete(e.uri)),e.uri.scheme!==_.ny.inMemory&&e.uri.scheme!==_.ny.internal&&e.uri.scheme!==_.ny.vscode||this._markerService?.read({resource:e.uri}).map((e=>e.owner)).forEach((t=>this._markerService.remove(t,[e.uri])))}_updateDecorations(e){const t=this._markerService.read({resource:e.model.uri,take:500});e.update(t)&&this._onDidChangeMarker.fire(e.model)}};L=function(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([v(0,m.IModelService),v(1,u)],L);class w extends c.jG{constructor(e){super(),this.model=e,this._map=new C.cO,this._register((0,c.s)((()=>{this.model.deltaDecorations([...this._map.values()],[]),this._map.clear()})))}update(e){const{added:t,removed:n}=function(e,t){const n=[],i=[];for(const i of e)t.has(i)||n.push(i);for(const n of t)e.has(n)||i.push(n);return{removed:n,added:i}}(new Set(this._map.keys()),new Set(e));if(0===t.length&&0===n.length)return!1;const i=n.map((e=>this._map.get(e))),r=t.map((e=>({range:this._createDecorationRange(this.model,e),options:this._createDecorationOption(e)}))),s=this.model.deltaDecorations(i,r);for(const e of n)this._map.delete(e);for(let e=0;e<s.length;e++)this._map.set(t[e],s[e]);return!0}getMarker(e){return this._map.getKey(e.id)}_createDecorationRange(e,t){let n=p.Q.lift(t);if(t.severity!==o.Hint||this._hasMarkerTag(t,1)||this._hasMarkerTag(t,2)||(n=n.setEndPosition(n.startLineNumber,n.startColumn+2)),n=e.validateRange(n),n.isEmpty()){const t=e.getLineLastNonWhitespaceColumn(n.startLineNumber)||e.getLineMaxColumn(n.startLineNumber);if(1===t||n.endColumn>=t)return n;const i=e.getWordAtPosition(n.getStartPosition());i&&(n=new p.Q(n.startLineNumber,i.startColumn,n.endLineNumber,i.endColumn))}else if(t.endColumn===Number.MAX_VALUE&&1===t.startColumn&&n.startLineNumber===n.endLineNumber){const i=e.getLineFirstNonWhitespaceColumn(t.startLineNumber);i<n.endColumn&&(n=new p.Q(n.startLineNumber,i,n.endLineNumber,n.endColumn),t.startColumn=i)}return n}_createDecorationOption(e){let t,n,i,r,s;switch(e.severity){case o.Hint:t=this._hasMarkerTag(e,2)?void 0:this._hasMarkerTag(e,1)?"squiggly-unnecessary":"squiggly-hint",i=0;break;case o.Info:t="squiggly-info",n=(0,g.Yf)(f.AQ),i=10,s={color:(0,g.Yf)(k.KoI),position:1};break;case o.Warning:t="squiggly-warning",n=(0,g.Yf)(f.aZ),i=20,s={color:(0,g.Yf)(k.uMG),position:1};break;case o.Error:default:t="squiggly-error",n=(0,g.Yf)(f.yI),i=30,s={color:(0,g.Yf)(k.yLC),position:1}}return e.tags&&(-1!==e.tags.indexOf(1)&&(r="squiggly-inline-unnecessary"),-1!==e.tags.indexOf(2)&&(r="squiggly-inline-deprecated")),{description:"marker-decoration",stickiness:1,className:t,showIfCollapsed:!0,overviewRuler:{color:n,position:d.A5.Right},minimap:s,zIndex:i,inlineClassName:r}}_hasMarkerTag(e,t){return!!e.tags&&e.tags.indexOf(t)>=0}}},4830:(e,t,n)=>{"use strict";n.r(t),n.d(t,{IModelService:()=>i});const i=(0,n(2399).u1)("modelService")},125:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DefaultModelSHA1Computer:()=>fr,ModelService:()=>gr});var i=n(2106),r=n(9235),s=n(3339),o=n(3338),a=n(4901),l=n(4327),h=n(6844),u=n(7264),c=n(3902);class d{static _nextVisibleColumn(e,t,n){return 9===e?d.nextRenderTabStop(t,n):h.ne(e)||h.Ss(e)?t+2:t+1}static visibleColumnFromColumn(e,t,n){const i=Math.min(t-1,e.length),r=e.substring(0,i),s=new h.km(r);let o=0;for(;!s.eol();){const e=h.Z5(r,i,s.offset);s.nextGraphemeLength(),o=this._nextVisibleColumn(e,o,n)}return o}static columnFromVisibleColumn(e,t,n){if(t<=0)return 1;const i=e.length,r=new h.km(e);let s=0,o=1;for(;!r.eol();){const a=h.Z5(e,i,r.offset);r.nextGraphemeLength();const l=this._nextVisibleColumn(a,s,n),u=r.offset+1;if(l>=t)return l-t<t-s?u:o;s=l,o=u}return i+1}static nextRenderTabStop(e,t){return e+t-e%t}static nextIndentTabStop(e,t){return e+t-e%t}static prevRenderTabStop(e,t){return Math.max(0,e-1-(e-1)%t)}static prevIndentTabStop(e,t){return Math.max(0,e-1-(e-1)%t)}}var g=n(5365),f=n(8061),m=n(3702);const p={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0,bracketPairColorizationOptions:{enabled:!0,independentColorPoolPerBracketType:!1}};var _,b=n(7922),k=n(8782);!function(e){e[e.None=0]="None",e[e.Indent=1]="Indent",e[e.IndentOutdent=2]="IndentOutdent",e[e.Outdent=3]="Outdent"}(_||(_={}));class C{constructor(e){if(this._neutralCharacter=null,this._neutralCharacterSearched=!1,this.open=e.open,this.close=e.close,this._inString=!0,this._inComment=!0,this._inRegEx=!0,Array.isArray(e.notIn))for(let t=0,n=e.notIn.length;t<n;t++)switch(e.notIn[t]){case"string":this._inString=!1;break;case"comment":this._inComment=!1;break;case"regex":this._inRegEx=!1}}isOK(e){switch(e){case 0:return!0;case 1:return this._inComment;case 2:return this._inString;case 3:return this._inRegEx}}shouldAutoClose(e,t){if(0===e.getTokenCount())return!0;const n=e.findTokenIndexAtOffset(t-2),i=e.getStandardTokenType(n);return this.isOK(i)}_findNeutralCharacterInRange(e,t){for(let n=e;n<=t;n++){const e=String.fromCharCode(n);if(!this.open.includes(e)&&!this.close.includes(e))return e}return null}findNeutralCharacter(){return this._neutralCharacterSearched||(this._neutralCharacterSearched=!0,this._neutralCharacter||(this._neutralCharacter=this._findNeutralCharacterInRange(48,57)),this._neutralCharacter||(this._neutralCharacter=this._findNeutralCharacterInRange(97,122)),this._neutralCharacter||(this._neutralCharacter=this._findNeutralCharacterInRange(65,90))),this._neutralCharacter}}class v{constructor(e){this.autoClosingPairsOpenByStart=new Map,this.autoClosingPairsOpenByEnd=new Map,this.autoClosingPairsCloseByStart=new Map,this.autoClosingPairsCloseByEnd=new Map,this.autoClosingPairsCloseSingleChar=new Map;for(const t of e)L(this.autoClosingPairsOpenByStart,t.open.charAt(0),t),L(this.autoClosingPairsOpenByEnd,t.open.charAt(t.open.length-1),t),L(this.autoClosingPairsCloseByStart,t.close.charAt(0),t),L(this.autoClosingPairsCloseByEnd,t.close.charAt(t.close.length-1),t),1===t.close.length&&1===t.open.length&&L(this.autoClosingPairsCloseSingleChar,t.close,t)}}function L(e,t,n){e.has(t)?e.get(t).push(n):e.set(t,[n])}class w{static{this.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES=";:.,=}])> \n\t"}static{this.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS="'\"`;:.,=}])> \n\t"}constructor(e){if(e.autoClosingPairs?this._autoClosingPairs=e.autoClosingPairs.map((e=>new C(e))):e.brackets?this._autoClosingPairs=e.brackets.map((e=>new C({open:e[0],close:e[1]}))):this._autoClosingPairs=[],e.__electricCharacterSupport&&e.__electricCharacterSupport.docComment){const t=e.__electricCharacterSupport.docComment;this._autoClosingPairs.push(new C({open:t.open,close:t.close||""}))}this._autoCloseBeforeForQuotes="string"==typeof e.autoCloseBefore?e.autoCloseBefore:w.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES,this._autoCloseBeforeForBrackets="string"==typeof e.autoCloseBefore?e.autoCloseBefore:w.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS,this._surroundingPairs=e.surroundingPairs||this._autoClosingPairs}getAutoClosingPairs(){return this._autoClosingPairs}getAutoCloseBeforeSet(e){return e?this._autoCloseBeforeForQuotes:this._autoCloseBeforeForBrackets}getSurroundingPairs(){return this._surroundingPairs}}function y(e){return!!(3&e)}var S=n(2802);let x,E,N;function I(){return x||(x=new TextDecoder("UTF-16LE")),x}class T{constructor(e,t,n,i,r,s){this._richEditBracketBrand=void 0,this.languageId=e,this.index=t,this.open=n,this.close=i,this.forwardRegex=r,this.reversedRegex=s,this._openSet=T._toSet(this.open),this._closeSet=T._toSet(this.close)}isOpen(e){return this._openSet.has(e)}isClose(e){return this._closeSet.has(e)}static _toSet(e){const t=new Set;for(const n of e)t.add(n);return t}}class A{constructor(e,t){this._richEditBracketsBrand=void 0;const n=function(e){const t=e.length;e=e.map((e=>[e[0].toLowerCase(),e[1].toLowerCase()]));const n=[];for(let e=0;e<t;e++)n[e]=e;const i=(e,t)=>{const[n,i]=e,[r,s]=t;return n===r||n===s||i===r||i===s},r=(e,i)=>{const r=Math.min(e,i),s=Math.max(e,i);for(let e=0;e<t;e++)n[e]===s&&(n[e]=r)};for(let s=0;s<t;s++){const o=e[s];for(let a=s+1;a<t;a++)i(o,e[a])&&r(n[s],n[a])}const s=[];for(let i=0;i<t;i++){const r=[],o=[];for(let s=0;s<t;s++)if(n[s]===i){const[t,n]=e[s];r.push(t),o.push(n)}r.length>0&&s.push({open:r,close:o})}return s}(t);this.brackets=n.map(((t,i)=>new T(e,i,t.open,t.close,function(e,t,n,i){let r=[];r=r.concat(e),r=r.concat(t);for(let e=0,t=r.length;e<t;e++)R(r[e],n,i,r);return r=D(r),r.sort(M),r.reverse(),B(r)}(t.open,t.close,n,i),function(e,t,n,i){let r=[];r=r.concat(e),r=r.concat(t);for(let e=0,t=r.length;e<t;e++)R(r[e],n,i,r);return r=D(r),r.sort(M),r.reverse(),B(r.map(F))}(t.open,t.close,n,i)))),this.forwardRegex=function(e){let t=[];for(const n of e){for(const e of n.open)t.push(e);for(const e of n.close)t.push(e)}return t=D(t),B(t)}(this.brackets),this.reversedRegex=function(e){let t=[];for(const n of e){for(const e of n.open)t.push(e);for(const e of n.close)t.push(e)}return t=D(t),B(t.map(F))}(this.brackets),this.textIsBracket={},this.textIsOpenBracket={},this.maxBracketLength=0;for(const e of this.brackets){for(const t of e.open)this.textIsBracket[t]=e,this.textIsOpenBracket[t]=!0,this.maxBracketLength=Math.max(this.maxBracketLength,t.length);for(const t of e.close)this.textIsBracket[t]=e,this.textIsOpenBracket[t]=!1,this.maxBracketLength=Math.max(this.maxBracketLength,t.length)}}}function R(e,t,n,i){for(let r=0,s=t.length;r<s;r++){if(r===n)continue;const s=t[r];for(const t of s.open)t.indexOf(e)>=0&&i.push(t);for(const t of s.close)t.indexOf(e)>=0&&i.push(t)}}function M(e,t){return e.length-t.length}function D(e){if(e.length<=1)return e;const t=[],n=new Set;for(const i of e)n.has(i)||(t.push(i),n.add(i));return t}function O(e){const t=/^[\w ]+$/.test(e);return e=h.bm(e),t?`\\b${e}\\b`:e}function B(e,t){const n=`(${e.map(O).join(")|(")})`;return h.OS(n,!0,t)}const F=function(){let e=null,t=null;return function(n){return e!==n&&(e=n,t=function(e){const t=new Uint16Array(e.length);let n=0;for(let i=e.length-1;i>=0;i--)t[n++]=e.charCodeAt(i);return(N||(N=s.cm()?I():(E||(E=new TextDecoder("UTF-16BE")),E)),N).decode(t)}(e)),t}}();class P{static _findPrevBracketInText(e,t,n,i){const r=n.match(e);if(!r)return null;const s=n.length-(r.index||0),o=r[0].length,a=i+s;return new f.Q(t,a-o+1,t,a+1)}static findPrevBracketInRange(e,t,n,i,r){const s=F(n).substring(n.length-r,n.length-i);return this._findPrevBracketInText(e,t,s,i)}static findNextBracketInText(e,t,n,i){const r=n.match(e);if(!r)return null;const s=r.index||0,o=r[0].length;if(0===o)return null;const a=i+s;return new f.Q(t,a+1,t,a+1+o)}static findNextBracketInRange(e,t,n,i,r){const s=n.substring(i,r);return this.findNextBracketInText(e,t,s,i)}}class z{constructor(e){this._richEditBrackets=e}getElectricCharacters(){const e=[];if(this._richEditBrackets)for(const t of this._richEditBrackets.brackets)for(const n of t.close){const t=n.charAt(n.length-1);e.push(t)}return(0,o.dM)(e)}onElectricCharacter(e,t,n){if(!this._richEditBrackets||0===this._richEditBrackets.brackets.length)return null;const i=t.findTokenIndexAtOffset(n-1);if(y(t.getStandardTokenType(i)))return null;const r=this._richEditBrackets.reversedRegex,s=t.getLineContent().substring(0,n-1)+e,o=P.findPrevBracketInRange(r,1,s,0,s.length);if(!o)return null;const a=s.substring(o.startColumn-1,o.endColumn-1).toLowerCase();if(this._richEditBrackets.textIsOpenBracket[a])return null;const l=t.getActualLineContentBefore(o.startColumn-1);return/^\s*$/.test(l)?{matchOpenBracket:a}:null}}function V(e){return e.global&&(e.lastIndex=0),!0}class q{constructor(e){this._indentationRules=e}shouldIncrease(e){return!!(this._indentationRules&&this._indentationRules.increaseIndentPattern&&V(this._indentationRules.increaseIndentPattern)&&this._indentationRules.increaseIndentPattern.test(e))}shouldDecrease(e){return!!(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&V(this._indentationRules.decreaseIndentPattern)&&this._indentationRules.decreaseIndentPattern.test(e))}shouldIndentNextLine(e){return!!(this._indentationRules&&this._indentationRules.indentNextLinePattern&&V(this._indentationRules.indentNextLinePattern)&&this._indentationRules.indentNextLinePattern.test(e))}shouldIgnore(e){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&V(this._indentationRules.unIndentedLinePattern)&&this._indentationRules.unIndentedLinePattern.test(e))}getIndentMetadata(e){let t=0;return this.shouldIncrease(e)&&(t+=1),this.shouldDecrease(e)&&(t+=2),this.shouldIndentNextLine(e)&&(t+=4),this.shouldIgnore(e)&&(t+=8),t}}class W{constructor(e){(e=e||{}).brackets=e.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=[],e.brackets.forEach((e=>{const t=W._createOpenBracketRegExp(e[0]),n=W._createCloseBracketRegExp(e[1]);t&&n&&this._brackets.push({open:e[0],openRegExp:t,close:e[1],closeRegExp:n})})),this._regExpRules=e.onEnterRules||[]}onEnter(e,t,n,i){if(e>=3)for(let e=0,r=this._regExpRules.length;e<r;e++){const r=this._regExpRules[e];if([{reg:r.beforeText,text:n},{reg:r.afterText,text:i},{reg:r.previousLineText,text:t}].every((e=>!e.reg||(e.reg.lastIndex=0,e.reg.test(e.text)))))return r.action}if(e>=2&&n.length>0&&i.length>0)for(let e=0,t=this._brackets.length;e<t;e++){const t=this._brackets[e];if(t.openRegExp.test(n)&&t.closeRegExp.test(i))return{indentAction:_.IndentOutdent}}if(e>=2&&n.length>0)for(let e=0,t=this._brackets.length;e<t;e++)if(this._brackets[e].openRegExp.test(n))return{indentAction:_.Indent};return null}static _createOpenBracketRegExp(e){let t=h.bm(e);return/\B/.test(t.charAt(0))||(t="\\b"+t),t+="\\s*$",W._safeRegExp(t)}static _createCloseBracketRegExp(e){let t=h.bm(e);return/\B/.test(t.charAt(t.length-1))||(t+="\\b"),t="^\\s*"+t,W._safeRegExp(t)}static _safeRegExp(e){try{return new RegExp(e)}catch(e){return(0,l.dz)(e),null}}}var H=n(2399),U=n(5753),K=n(9031),j=n(4957),$=n(6260);class G{constructor(e,t){this.languageId=e;const n=t.brackets?Q(t.brackets):[],i=new $.VV((e=>{const t=new Set;return{info:new X(this,e,t),closing:t}})),r=new $.VV((e=>{const t=new Set,n=new Set;return{info:new Z(this,e,t,n),opening:t,openingColorized:n}}));for(const[e,t]of n){const n=i.get(e),s=r.get(t);n.closing.add(s.info),s.opening.add(n.info)}const s=t.colorizedBracketPairs?Q(t.colorizedBracketPairs):n.filter((e=>!("<"===e[0]&&">"===e[1])));for(const[e,t]of s){const n=i.get(e),s=r.get(t);n.closing.add(s.info),s.openingColorized.add(n.info),s.opening.add(n.info)}this._openingBrackets=new Map([...i.cachedValues].map((([e,t])=>[e,t.info]))),this._closingBrackets=new Map([...r.cachedValues].map((([e,t])=>[e,t.info])))}get openingBrackets(){return[...this._openingBrackets.values()]}get closingBrackets(){return[...this._closingBrackets.values()]}getOpeningBracketInfo(e){return this._openingBrackets.get(e)}getClosingBracketInfo(e){return this._closingBrackets.get(e)}getBracketInfo(e){return this.getOpeningBracketInfo(e)||this.getClosingBracketInfo(e)}getBracketRegExp(e){return B(Array.from([...this._openingBrackets.keys(),...this._closingBrackets.keys()]),e)}}function Q(e){return e.filter((([e,t])=>""!==e&&""!==t))}class Y{constructor(e,t){this.config=e,this.bracketText=t}get languageId(){return this.config.languageId}}class X extends Y{constructor(e,t,n){super(e,t),this.openedBrackets=n,this.isOpeningBracket=!0}}class Z extends Y{constructor(e,t,n,i){super(e,t),this.openingBrackets=n,this.openingColorizedBrackets=i,this.isOpeningBracket=!1}closes(e){return e.config===this.config&&this.openingBrackets.has(e)}closesColorized(e){return e.config===this.config&&this.openingColorizedBrackets.has(e)}getOpeningBrackets(){return[...this.openingBrackets]}}var J=function(e,t){return function(n,i){t(n,i,e)}};class ee{constructor(e){this.languageId=e}affects(e){return!this.languageId||this.languageId===e}}const te=(0,H.u1)("languageConfigurationService");let ne=class extends r.jG{constructor(e,t){super(),this.configurationService=e,this.languageService=t,this._registry=this._register(new he),this.onDidChangeEmitter=this._register(new i.vl),this.onDidChange=this.onDidChangeEmitter.event,this.configurations=new Map;const n=new Set(Object.values(ie));this._register(this.configurationService.onDidChangeConfiguration((e=>{const t=e.change.keys.some((e=>n.has(e))),i=e.change.overrides.filter((([e,t])=>t.some((e=>n.has(e))))).map((([e])=>e));if(t)this.configurations.clear(),this.onDidChangeEmitter.fire(new ee(void 0));else for(const e of i)this.languageService.isRegisteredLanguageId(e)&&(this.configurations.delete(e),this.onDidChangeEmitter.fire(new ee(e)))}))),this._register(this._registry.onDidChange((e=>{this.configurations.delete(e.languageId),this.onDidChangeEmitter.fire(new ee(e.languageId))})))}register(e,t,n){return this._registry.register(e,t,n)}getLanguageConfiguration(e){let t=this.configurations.get(e);return t||(t=function(e,t,n,i){let r=t.getLanguageConfiguration(e);if(!r){if(!i.isRegisteredLanguageId(e))return new ue(e,{});r=new ue(e,{})}const s=function(e,t){const n=t.getValue(ie.brackets,{overrideIdentifier:e}),i=t.getValue(ie.colorizedBracketPairs,{overrideIdentifier:e});return{brackets:re(n),colorizedBracketPairs:re(i)}}(r.languageId,n),o=oe([r.underlyingConfig,s]);return new ue(r.languageId,o)}(e,this._registry,this.configurationService,this.languageService),this.configurations.set(e,t)),t}};ne=function(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([J(0,U.pG),J(1,b.L)],ne);const ie={brackets:"editor.language.brackets",colorizedBracketPairs:"editor.language.colorizedBracketPairs"};function re(e){if(Array.isArray(e))return e.map((e=>{if(Array.isArray(e)&&2===e.length)return[e[0],e[1]]})).filter((e=>!!e))}class se{constructor(e){this.languageId=e,this._resolved=null,this._entries=[],this._order=0,this._resolved=null}register(e,t){const n=new ae(e,t,++this._order);return this._entries.push(n),this._resolved=null,(0,r.s)((()=>{for(let e=0;e<this._entries.length;e++)if(this._entries[e]===n){this._entries.splice(e,1),this._resolved=null;break}}))}getResolvedConfiguration(){if(!this._resolved){const e=this._resolve();e&&(this._resolved=new ue(this.languageId,e))}return this._resolved}_resolve(){return 0===this._entries.length?null:(this._entries.sort(ae.cmp),oe(this._entries.map((e=>e.configuration))))}}function oe(e){let t={comments:void 0,brackets:void 0,wordPattern:void 0,indentationRules:void 0,onEnterRules:void 0,autoClosingPairs:void 0,surroundingPairs:void 0,autoCloseBefore:void 0,folding:void 0,colorizedBracketPairs:void 0,__electricCharacterSupport:void 0};for(const n of e)t={comments:n.comments||t.comments,brackets:n.brackets||t.brackets,wordPattern:n.wordPattern||t.wordPattern,indentationRules:n.indentationRules||t.indentationRules,onEnterRules:n.onEnterRules||t.onEnterRules,autoClosingPairs:n.autoClosingPairs||t.autoClosingPairs,surroundingPairs:n.surroundingPairs||t.surroundingPairs,autoCloseBefore:n.autoCloseBefore||t.autoCloseBefore,folding:n.folding||t.folding,colorizedBracketPairs:n.colorizedBracketPairs||t.colorizedBracketPairs,__electricCharacterSupport:n.__electricCharacterSupport||t.__electricCharacterSupport};return t}class ae{constructor(e,t,n){this.configuration=e,this.priority=t,this.order=n}static cmp(e,t){return e.priority===t.priority?e.order-t.order:e.priority-t.priority}}class le{constructor(e){this.languageId=e}}class he extends r.jG{constructor(){super(),this._entries=new Map,this._onDidChange=this._register(new i.vl),this.onDidChange=this._onDidChange.event,this._register(this.register(j.vH,{brackets:[["(",")"],["[","]"],["{","}"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],colorizedBracketPairs:[],folding:{offSide:!0}},0))}register(e,t,n=0){let i=this._entries.get(e);i||(i=new se(e),this._entries.set(e,i));const s=i.register(t,n);return this._onDidChange.fire(new le(e)),(0,r.s)((()=>{s.dispose(),this._onDidChange.fire(new le(e))}))}getLanguageConfiguration(e){const t=this._entries.get(e);return t?.getResolvedConfiguration()||null}}class ue{constructor(e,t){this.languageId=e,this.underlyingConfig=t,this._brackets=null,this._electricCharacter=null,this._onEnterSupport=this.underlyingConfig.brackets||this.underlyingConfig.indentationRules||this.underlyingConfig.onEnterRules?new W(this.underlyingConfig):null,this.comments=ue._handleComments(this.underlyingConfig),this.characterPair=new w(this.underlyingConfig),this.wordDefinition=this.underlyingConfig.wordPattern||k.Ld,this.indentationRules=this.underlyingConfig.indentationRules,this.underlyingConfig.indentationRules?this.indentRulesSupport=new q(this.underlyingConfig.indentationRules):this.indentRulesSupport=null,this.foldingRules=this.underlyingConfig.folding||{},this.bracketsNew=new G(e,this.underlyingConfig)}getWordDefinition(){return(0,k.Io)(this.wordDefinition)}get brackets(){return!this._brackets&&this.underlyingConfig.brackets&&(this._brackets=new A(this.languageId,this.underlyingConfig.brackets)),this._brackets}get electricCharacter(){return this._electricCharacter||(this._electricCharacter=new z(this.brackets)),this._electricCharacter}onEnter(e,t,n,i){return this._onEnterSupport?this._onEnterSupport.onEnter(e,t,n,i):null}getAutoClosingPairs(){return new v(this.characterPair.getAutoClosingPairs())}getAutoCloseBeforeSet(e){return this.characterPair.getAutoCloseBeforeSet(e)}getSurroundingPairs(){return this.characterPair.getSurroundingPairs()}static _handleComments(e){const t=e.comments;if(!t)return null;const n={};if(t.lineComment&&(n.lineCommentToken=t.lineComment),t.blockComment){const[e,i]=t.blockComment;n.blockCommentStartToken=e,n.blockCommentEndToken=i}return n}}(0,K.v)(te,ne,1);var ce=n(6055);class de{constructor(e,t,n,i){this.range=e,this.nestingLevel=t,this.nestingLevelOfEqualBracketType=n,this.isInvalid=i}}class ge{constructor(e,t,n,i,r,s){this.range=e,this.openingBracketRange=t,this.closingBracketRange=n,this.nestingLevel=i,this.nestingLevelOfEqualBracketType=r,this.bracketPairNode=s}get openingBracketInfo(){return this.bracketPairNode.openingBracket.bracketInfo}}class fe extends ge{constructor(e,t,n,i,r,s,o){super(e,t,n,i,r,s),this.minVisibleColumnIndentation=o}}var me=n(8357);function pe(e){return 0===e}const _e=2**26;function be(e,t){return e*_e+t}function ke(e){const t=e,n=Math.floor(t/_e),i=t-n*_e;return new me.W(n,i)}function Ce(e,t){let n=e+t;return t>=_e&&(n-=e%_e),n}function ve(e,t){return e.reduce(((e,n)=>Ce(e,t(n))),0)}function Le(e,t){return e===t}function we(e,t){const n=e,i=t;if(i-n<=0)return 0;const r=Math.floor(n/_e),s=Math.floor(i/_e),o=i-s*_e;return r===s?be(0,o-(n-r*_e)):be(s-r,o)}function ye(e,t){return e<t}function Se(e,t){return e<=t}function xe(e,t){return e>=t}function Ee(e){return be(e.lineNumber-1,e.column-1)}function Ne(e,t){const n=e,i=Math.floor(n/_e),r=n-i*_e,s=t,o=Math.floor(s/_e),a=s-o*_e;return new f.Q(i+1,r+1,o+1,a+1)}class Ie{static fromModelContentChanges(e){return e.map((e=>{const t=f.Q.lift(e.range);return new Ie(Ee(t.getStartPosition()),Ee(t.getEndPosition()),function(e){const t=(0,h.uz)(e);return be(t.length-1,t[t.length-1].length)}(e.text))})).reverse()}constructor(e,t,n){this.startOffset=e,this.endOffset=t,this.newLength=n}toString(){return`[${ke(this.startOffset)}...${ke(this.endOffset)}) -> ${ke(this.newLength)}`}}class Te{constructor(e){this.nextEditIdx=0,this.deltaOldToNewLineCount=0,this.deltaOldToNewColumnCount=0,this.deltaLineIdxInOld=-1,this.edits=e.map((e=>Ae.from(e)))}getOffsetBeforeChange(e){return this.adjustNextEdit(e),this.translateCurToOld(e)}getDistanceToNextChange(e){this.adjustNextEdit(e);const t=this.edits[this.nextEditIdx],n=t?this.translateOldToCur(t.offsetObj):null;return null===n?null:we(e,n)}translateOldToCur(e){return e.lineCount===this.deltaLineIdxInOld?be(e.lineCount+this.deltaOldToNewLineCount,e.columnCount+this.deltaOldToNewColumnCount):be(e.lineCount+this.deltaOldToNewLineCount,e.columnCount)}translateCurToOld(e){const t=ke(e);return t.lineCount-this.deltaOldToNewLineCount===this.deltaLineIdxInOld?be(t.lineCount-this.deltaOldToNewLineCount,t.columnCount-this.deltaOldToNewColumnCount):be(t.lineCount-this.deltaOldToNewLineCount,t.columnCount)}adjustNextEdit(e){for(;this.nextEditIdx<this.edits.length;){const t=this.edits[this.nextEditIdx],n=this.translateOldToCur(t.endOffsetAfterObj);if(!Se(n,e))break;{this.nextEditIdx++;const e=ke(n),i=ke(this.translateOldToCur(t.endOffsetBeforeObj)),r=e.lineCount-i.lineCount;this.deltaOldToNewLineCount+=r;const s=this.deltaLineIdxInOld===t.endOffsetBeforeObj.lineCount?this.deltaOldToNewColumnCount:0,o=e.columnCount-i.columnCount;this.deltaOldToNewColumnCount=s+o,this.deltaLineIdxInOld=t.endOffsetBeforeObj.lineCount}}}}class Ae{static from(e){return new Ae(e.startOffset,e.endOffset,e.newLength)}constructor(e,t,n){this.endOffsetBeforeObj=ke(t),this.endOffsetAfterObj=ke(Ce(e,n)),this.offsetObj=ke(e)}}const Re=[];class Me{static{this.cache=new Array(129)}static create(e,t){if(e<=128&&0===t.length){let n=Me.cache[e];return n||(n=new Me(e,t),Me.cache[e]=n),n}return new Me(e,t)}static{this.empty=Me.create(0,Re)}static getEmpty(){return this.empty}constructor(e,t){this.items=e,this.additionalItems=t}add(e,t){const n=t.getKey(e);let i=n>>5;if(0===i){const e=1<<n|this.items;return e===this.items?this:Me.create(e,this.additionalItems)}i--;const r=this.additionalItems.slice(0);for(;r.length<i;)r.push(0);return r[i]|=1<<(31&n),Me.create(this.items,r)}merge(e){const t=this.items|e.items;if(this.additionalItems===Re&&e.additionalItems===Re)return t===this.items?this:t===e.items?e:Me.create(t,Re);const n=[];for(let t=0;t<Math.max(this.additionalItems.length,e.additionalItems.length);t++){const i=this.additionalItems[t]||0,r=e.additionalItems[t]||0;n.push(i|r)}return Me.create(t,n)}intersects(e){if(this.items&e.items)return!0;for(let t=0;t<Math.min(this.additionalItems.length,e.additionalItems.length);t++)if(this.additionalItems[t]&e.additionalItems[t])return!0;return!1}}const De={getKey:e=>e};class Oe{constructor(){this.items=new Map}getKey(e){let t=this.items.get(e);return void 0===t&&(t=this.items.size,this.items.set(e,t)),t}}class Be{get length(){return this._length}constructor(e){this._length=e}}class Fe extends Be{static create(e,t,n){let i=e.length;return t&&(i=Ce(i,t.length)),n&&(i=Ce(i,n.length)),new Fe(i,e,t,n,t?t.missingOpeningBracketIds:Me.getEmpty())}get kind(){return 2}get listHeight(){return 0}get childrenLength(){return 3}getChild(e){switch(e){case 0:return this.openingBracket;case 1:return this.child;case 2:return this.closingBracket}throw new Error("Invalid child index")}get children(){const e=[];return e.push(this.openingBracket),this.child&&e.push(this.child),this.closingBracket&&e.push(this.closingBracket),e}constructor(e,t,n,i,r){super(e),this.openingBracket=t,this.child=n,this.closingBracket=i,this.missingOpeningBracketIds=r}canBeReused(e){return null!==this.closingBracket&&!e.intersects(this.missingOpeningBracketIds)}deepClone(){return new Fe(this.length,this.openingBracket.deepClone(),this.child&&this.child.deepClone(),this.closingBracket&&this.closingBracket.deepClone(),this.missingOpeningBracketIds)}computeMinIndentation(e,t){return this.child?this.child.computeMinIndentation(Ce(e,this.openingBracket.length),t):Number.MAX_SAFE_INTEGER}}class Pe extends Be{static create23(e,t,n,i=!1){let r=e.length,s=e.missingOpeningBracketIds;if(e.listHeight!==t.listHeight)throw new Error("Invalid list heights");if(r=Ce(r,t.length),s=s.merge(t.missingOpeningBracketIds),n){if(e.listHeight!==n.listHeight)throw new Error("Invalid list heights");r=Ce(r,n.length),s=s.merge(n.missingOpeningBracketIds)}return i?new Ve(r,e.listHeight+1,e,t,n,s):new ze(r,e.listHeight+1,e,t,n,s)}static getEmpty(){return new We(0,0,[],Me.getEmpty())}get kind(){return 4}get missingOpeningBracketIds(){return this._missingOpeningBracketIds}constructor(e,t,n){super(e),this.listHeight=t,this._missingOpeningBracketIds=n,this.cachedMinIndentation=-1}throwIfImmutable(){}makeLastElementMutable(){this.throwIfImmutable();const e=this.childrenLength;if(0===e)return;const t=this.getChild(e-1),n=4===t.kind?t.toMutable():t;return t!==n&&this.setChild(e-1,n),n}makeFirstElementMutable(){if(this.throwIfImmutable(),0===this.childrenLength)return;const e=this.getChild(0),t=4===e.kind?e.toMutable():e;return e!==t&&this.setChild(0,t),t}canBeReused(e){if(e.intersects(this.missingOpeningBracketIds))return!1;if(0===this.childrenLength)return!1;let t=this;for(;4===t.kind;){const e=t.childrenLength;if(0===e)throw new l.D7;t=t.getChild(e-1)}return t.canBeReused(e)}handleChildrenChanged(){this.throwIfImmutable();const e=this.childrenLength;let t=this.getChild(0).length,n=this.getChild(0).missingOpeningBracketIds;for(let i=1;i<e;i++){const e=this.getChild(i);t=Ce(t,e.length),n=n.merge(e.missingOpeningBracketIds)}this._length=t,this._missingOpeningBracketIds=n,this.cachedMinIndentation=-1}computeMinIndentation(e,t){if(-1!==this.cachedMinIndentation)return this.cachedMinIndentation;let n=Number.MAX_SAFE_INTEGER,i=e;for(let e=0;e<this.childrenLength;e++){const r=this.getChild(e);r&&(n=Math.min(n,r.computeMinIndentation(i,t)),i=Ce(i,r.length))}return this.cachedMinIndentation=n,n}}class ze extends Pe{get childrenLength(){return null!==this._item3?3:2}getChild(e){switch(e){case 0:return this._item1;case 1:return this._item2;case 2:return this._item3}throw new Error("Invalid child index")}setChild(e,t){switch(e){case 0:return void(this._item1=t);case 1:return void(this._item2=t);case 2:return void(this._item3=t)}throw new Error("Invalid child index")}get children(){return this._item3?[this._item1,this._item2,this._item3]:[this._item1,this._item2]}get item1(){return this._item1}get item2(){return this._item2}get item3(){return this._item3}constructor(e,t,n,i,r,s){super(e,t,s),this._item1=n,this._item2=i,this._item3=r}deepClone(){return new ze(this.length,this.listHeight,this._item1.deepClone(),this._item2.deepClone(),this._item3?this._item3.deepClone():null,this.missingOpeningBracketIds)}appendChildOfSameHeight(e){if(this._item3)throw new Error("Cannot append to a full (2,3) tree node");this.throwIfImmutable(),this._item3=e,this.handleChildrenChanged()}unappendChild(){if(!this._item3)throw new Error("Cannot remove from a non-full (2,3) tree node");this.throwIfImmutable();const e=this._item3;return this._item3=null,this.handleChildrenChanged(),e}prependChildOfSameHeight(e){if(this._item3)throw new Error("Cannot prepend to a full (2,3) tree node");this.throwIfImmutable(),this._item3=this._item2,this._item2=this._item1,this._item1=e,this.handleChildrenChanged()}unprependChild(){if(!this._item3)throw new Error("Cannot remove from a non-full (2,3) tree node");this.throwIfImmutable();const e=this._item1;return this._item1=this._item2,this._item2=this._item3,this._item3=null,this.handleChildrenChanged(),e}toMutable(){return this}}class Ve extends ze{toMutable(){return new ze(this.length,this.listHeight,this.item1,this.item2,this.item3,this.missingOpeningBracketIds)}throwIfImmutable(){throw new Error("this instance is immutable")}}class qe extends Pe{get childrenLength(){return this._children.length}getChild(e){return this._children[e]}setChild(e,t){this._children[e]=t}get children(){return this._children}constructor(e,t,n,i){super(e,t,i),this._children=n}deepClone(){const e=new Array(this._children.length);for(let t=0;t<this._children.length;t++)e[t]=this._children[t].deepClone();return new qe(this.length,this.listHeight,e,this.missingOpeningBracketIds)}appendChildOfSameHeight(e){this.throwIfImmutable(),this._children.push(e),this.handleChildrenChanged()}unappendChild(){this.throwIfImmutable();const e=this._children.pop();return this.handleChildrenChanged(),e}prependChildOfSameHeight(e){this.throwIfImmutable(),this._children.unshift(e),this.handleChildrenChanged()}unprependChild(){this.throwIfImmutable();const e=this._children.shift();return this.handleChildrenChanged(),e}toMutable(){return this}}class We extends qe{toMutable(){return new qe(this.length,this.listHeight,[...this.children],this.missingOpeningBracketIds)}throwIfImmutable(){throw new Error("this instance is immutable")}}const He=[];class Ue extends Be{get listHeight(){return 0}get childrenLength(){return 0}getChild(e){return null}get children(){return He}deepClone(){return this}}class Ke extends Ue{get kind(){return 0}get missingOpeningBracketIds(){return Me.getEmpty()}canBeReused(e){return!0}computeMinIndentation(e,t){const n=ke(e),i=(0===n.columnCount?n.lineCount:n.lineCount+1)+1,r=(s=Ce(e,this.length),Math.floor(s/_e)+1);var s;let o=Number.MAX_SAFE_INTEGER;for(let e=i;e<=r;e++){const n=t.getLineFirstNonWhitespaceColumn(e),i=t.getLineContent(e);if(0===n)continue;const r=d.visibleColumnFromColumn(i,n,t.getOptions().tabSize);o=Math.min(o,r)}return o}}class je extends Ue{static create(e,t,n){return new je(e,t,n)}get kind(){return 1}get missingOpeningBracketIds(){return Me.getEmpty()}constructor(e,t,n){super(e),this.bracketInfo=t,this.bracketIds=n}get text(){return this.bracketInfo.bracketText}get languageId(){return this.bracketInfo.languageId}canBeReused(e){return!1}computeMinIndentation(e,t){return Number.MAX_SAFE_INTEGER}}class $e extends Ue{get kind(){return 3}constructor(e,t){super(t),this.missingOpeningBracketIds=e}canBeReused(e){return!e.intersects(this.missingOpeningBracketIds)}computeMinIndentation(e,t){return Number.MAX_SAFE_INTEGER}}var Ge=n(5910);class Qe{constructor(e,t,n,i,r){this.length=e,this.kind=t,this.bracketId=n,this.bracketIds=i,this.astNode=r}}class Ye{constructor(e,t){this.textModel=e,this.bracketTokens=t,this.reader=new Xe(this.textModel,this.bracketTokens),this._offset=0,this.didPeek=!1,this.peeked=null,this.textBufferLineCount=e.getLineCount(),this.textBufferLastLineLength=e.getLineLength(this.textBufferLineCount)}get offset(){return this._offset}get length(){return be(this.textBufferLineCount-1,this.textBufferLastLineLength)}skip(e){this.didPeek=!1,this._offset=Ce(this._offset,e);const t=ke(this._offset);this.reader.setPosition(t.lineCount,t.columnCount)}read(){let e;return this.peeked?(this.didPeek=!1,e=this.peeked):e=this.reader.read(),e&&(this._offset=Ce(this._offset,e.length)),e}peek(){return this.didPeek||(this.peeked=this.reader.read(),this.didPeek=!0),this.peeked}}class Xe{constructor(e,t){this.textModel=e,this.bracketTokens=t,this.lineIdx=0,this.line=null,this.lineCharOffset=0,this.lineTokens=null,this.lineTokenOffset=0,this.peekedToken=null,this.textBufferLineCount=e.getLineCount(),this.textBufferLastLineLength=e.getLineLength(this.textBufferLineCount)}setPosition(e,t){e===this.lineIdx?(this.lineCharOffset=t,null!==this.line&&(this.lineTokenOffset=0===this.lineCharOffset?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset))):(this.lineIdx=e,this.lineCharOffset=t,this.line=null),this.peekedToken=null}read(){if(this.peekedToken){const e=this.peekedToken;return this.peekedToken=null,this.lineCharOffset+=e.length,e}if(this.lineIdx>this.textBufferLineCount-1||this.lineIdx===this.textBufferLineCount-1&&this.lineCharOffset>=this.textBufferLastLineLength)return null;null===this.line&&(this.lineTokens=this.textModel.tokenization.getLineTokens(this.lineIdx+1),this.line=this.lineTokens.getLineContent(),this.lineTokenOffset=0===this.lineCharOffset?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset));const e=this.lineIdx,t=this.lineCharOffset;let n=0;for(;;){const i=this.lineTokens,r=i.getCount();let s=null;if(this.lineTokenOffset<r){const o=i.getMetadata(this.lineTokenOffset);for(;this.lineTokenOffset+1<r&&o===i.getMetadata(this.lineTokenOffset+1);)this.lineTokenOffset++;const a=0===Ge.x.getTokenType(o),l=Ge.x.containsBalancedBrackets(o),h=i.getEndOffset(this.lineTokenOffset);if(l&&a&&this.lineCharOffset<h){const e=i.getLanguageId(this.lineTokenOffset),t=this.line.substring(this.lineCharOffset,h),n=this.bracketTokens.getSingleLanguageBracketTokens(e),r=n.regExpGlobal;if(r){r.lastIndex=0;const e=r.exec(t);e&&(s=n.getToken(e[0]),s&&(this.lineCharOffset+=e.index))}}if(n+=h-this.lineCharOffset,s){if(e!==this.lineIdx||t!==this.lineCharOffset){this.peekedToken=s;break}return this.lineCharOffset+=s.length,s}this.lineTokenOffset++,this.lineCharOffset=h}else{if(this.lineIdx===this.textBufferLineCount-1)break;if(this.lineIdx++,this.lineTokens=this.textModel.tokenization.getLineTokens(this.lineIdx+1),this.lineTokenOffset=0,this.line=this.lineTokens.getLineContent(),this.lineCharOffset=0,n+=33,n>1e3)break}if(n>1500)break}const i=(r=e,s=t,o=this.lineIdx,a=this.lineCharOffset,r!==o?be(o-r,a):be(0,a-s));var r,s,o,a;return new Qe(i,0,-1,Me.getEmpty(),new Ke(i))}}class Ze{constructor(e,t){this.text=e,this._offset=0,this.idx=0;const n=t.getRegExpStr(),i=n?new RegExp(n+"|\n","gi"):null,r=[];let s,o=0,a=0,l=0,h=0;const u=[];for(let e=0;e<60;e++)u.push(new Qe(be(0,e),0,-1,Me.getEmpty(),new Ke(be(0,e))));const c=[];for(let e=0;e<60;e++)c.push(new Qe(be(1,e),0,-1,Me.getEmpty(),new Ke(be(1,e))));if(i)for(i.lastIndex=0;null!==(s=i.exec(e));){const e=s.index,n=s[0];if("\n"===n)o++,a=e+1;else{if(l!==e){let t;if(h===o){const n=e-l;if(n<u.length)t=u[n];else{const e=be(0,n);t=new Qe(e,0,-1,Me.getEmpty(),new Ke(e))}}else{const n=o-h,i=e-a;if(1===n&&i<c.length)t=c[i];else{const e=be(n,i);t=new Qe(e,0,-1,Me.getEmpty(),new Ke(e))}}r.push(t)}r.push(t.getToken(n)),l=e+n.length,h=o}}const d=e.length;if(l!==d){const e=h===o?be(0,d-l):be(o-h,d-a);r.push(new Qe(e,0,-1,Me.getEmpty(),new Ke(e)))}this.length=be(o,d-a),this.tokens=r}get offset(){return this._offset}read(){return this.tokens[this.idx++]||null}peek(){return this.tokens[this.idx]||null}skip(e){throw new l.EM}}class Je{static createFromLanguage(e,t){function n(e){return t.getKey(`${e.languageId}:::${e.bracketText}`)}const i=new Map;for(const t of e.bracketsNew.openingBrackets){const e=be(0,t.bracketText.length),r=n(t),s=Me.getEmpty().add(r,De);i.set(t.bracketText,new Qe(e,1,r,s,je.create(e,t,s)))}for(const t of e.bracketsNew.closingBrackets){const e=be(0,t.bracketText.length);let r=Me.getEmpty();const s=t.getOpeningBrackets();for(const e of s)r=r.add(n(e),De);i.set(t.bracketText,new Qe(e,2,n(s[0]),r,je.create(e,t,r)))}return new Je(i)}constructor(e){this.map=e,this.hasRegExp=!1,this._regExpGlobal=null}getRegExpStr(){if(this.isEmpty)return null;{const e=[...this.map.keys()];return e.sort(),e.reverse(),e.map((e=>function(e){let t=(0,h.bm)(e);return/^[\w ]+/.test(e)&&(t=`\\b${t}`),/[\w ]+$/.test(e)&&(t=`${t}\\b`),t}(e))).join("|")}}get regExpGlobal(){if(!this.hasRegExp){const e=this.getRegExpStr();this._regExpGlobal=e?new RegExp(e,"gi"):null,this.hasRegExp=!0}return this._regExpGlobal}getToken(e){return this.map.get(e.toLowerCase())}findClosingTokenText(e){for(const[t,n]of this.map)if(2===n.kind&&n.bracketIds.intersects(e))return t}get isEmpty(){return 0===this.map.size}}class et{constructor(e,t){this.denseKeyProvider=e,this.getLanguageConfiguration=t,this.languageIdToBracketTokens=new Map}didLanguageChange(e){return this.languageIdToBracketTokens.has(e)}getSingleLanguageBracketTokens(e){let t=this.languageIdToBracketTokens.get(e);return t||(t=Je.createFromLanguage(this.getLanguageConfiguration(e),this.denseKeyProvider),this.languageIdToBracketTokens.set(e,t)),t}}function tt(e,t=!1){if(0===e.length)return null;if(1===e.length)return e[0];let n=e.length;for(;n>3;){const i=n>>1;for(let r=0;r<i;r++){const i=r<<1;e[r]=Pe.create23(e[i],e[i+1],i+3===n?e[i+2]:null,t)}n=i}return Pe.create23(e[0],e[1],n>=3?e[2]:null,t)}function nt(e,t){return Math.abs(e.listHeight-t.listHeight)}function it(e,t){return e.listHeight===t.listHeight?Pe.create23(e,t,null,!1):e.listHeight>t.listHeight?function(e,t){let n=e=e.toMutable();const i=[];let r;for(;;){if(t.listHeight===n.listHeight){r=t;break}if(4!==n.kind)throw new Error("unexpected");i.push(n),n=n.makeLastElementMutable()}for(let e=i.length-1;e>=0;e--){const t=i[e];r?t.childrenLength>=3?r=Pe.create23(t.unappendChild(),r,null,!1):(t.appendChildOfSameHeight(r),r=void 0):t.handleChildrenChanged()}return r?Pe.create23(e,r,null,!1):e}(e,t):function(e,t){let n=e=e.toMutable();const i=[];for(;t.listHeight!==n.listHeight;){if(4!==n.kind)throw new Error("unexpected");i.push(n),n=n.makeFirstElementMutable()}let r=t;for(let e=i.length-1;e>=0;e--){const t=i[e];r?t.childrenLength>=3?r=Pe.create23(r,t.unprependChild(),null,!1):(t.prependChildOfSameHeight(r),r=void 0):t.handleChildrenChanged()}return r?Pe.create23(r,e,null,!1):e}(t,e)}class rt{constructor(e){this.lastOffset=0,this.nextNodes=[e],this.offsets=[0],this.idxs=[]}readLongestNodeAt(e,t){if(ye(e,this.lastOffset))throw new Error("Invalid offset");for(this.lastOffset=e;;){const n=ot(this.nextNodes);if(!n)return;const i=ot(this.offsets);if(ye(e,i))return;if(ye(i,e))if(Ce(i,n.length)<=e)this.nextNodeAfterCurrent();else{const e=st(n);-1!==e?(this.nextNodes.push(n.getChild(e)),this.offsets.push(i),this.idxs.push(e)):this.nextNodeAfterCurrent()}else{if(t(n))return this.nextNodeAfterCurrent(),n;{const e=st(n);if(-1===e)return void this.nextNodeAfterCurrent();this.nextNodes.push(n.getChild(e)),this.offsets.push(i),this.idxs.push(e)}}}}nextNodeAfterCurrent(){for(;;){const e=ot(this.offsets),t=ot(this.nextNodes);if(this.nextNodes.pop(),this.offsets.pop(),0===this.idxs.length)break;const n=ot(this.nextNodes),i=st(n,this.idxs[this.idxs.length-1]);if(-1!==i){this.nextNodes.push(n.getChild(i)),this.offsets.push(Ce(e,t.length)),this.idxs[this.idxs.length-1]=i;break}this.idxs.pop()}}}function st(e,t=-1){for(;;){if(++t>=e.childrenLength)return-1;if(e.getChild(t))return t}}function ot(e){return e.length>0?e[e.length-1]:void 0}function at(e,t,n,i){return new lt(e,t,n,i).parseDocument()}class lt{constructor(e,t,n,i){if(this.tokenizer=e,this.createImmutableLists=i,this._itemsConstructed=0,this._itemsFromCache=0,n&&i)throw new Error("Not supported");this.oldNodeReader=n?new rt(n):void 0,this.positionMapper=new Te(t)}parseDocument(){this._itemsConstructed=0,this._itemsFromCache=0;let e=this.parseList(Me.getEmpty(),0);return e||(e=Pe.getEmpty()),e}parseList(e,t){const n=[];for(;;){let i=this.tryReadChildFromCache(e);if(!i){const n=this.tokenizer.peek();if(!n||2===n.kind&&n.bracketIds.intersects(e))break;i=this.parseChild(e,t+1)}4===i.kind&&0===i.childrenLength||n.push(i)}const i=this.oldNodeReader?function(e){if(0===e.length)return null;if(1===e.length)return e[0];let t=0;function n(){if(t>=e.length)return null;const n=t,i=e[n].listHeight;for(t++;t<e.length&&e[t].listHeight===i;)t++;return t-n>=2?tt(0===n&&t===e.length?e:e.slice(n,t),!1):e[n]}let i=n(),r=n();if(!r)return i;for(let e=n();e;e=n())nt(i,r)<=nt(r,e)?(i=it(i,r),r=e):r=it(r,e);return it(i,r)}(n):tt(n,this.createImmutableLists);return i}tryReadChildFromCache(e){if(this.oldNodeReader){const t=this.positionMapper.getDistanceToNextChange(this.tokenizer.offset);if(null===t||!pe(t)){const n=this.oldNodeReader.readLongestNodeAt(this.positionMapper.getOffsetBeforeChange(this.tokenizer.offset),(n=>!(null!==t&&!ye(n.length,t))&&n.canBeReused(e)));if(n)return this._itemsFromCache++,this.tokenizer.skip(n.length),n}}}parseChild(e,t){this._itemsConstructed++;const n=this.tokenizer.read();switch(n.kind){case 2:return new $e(n.bracketIds,n.length);case 0:return n.astNode;case 1:{if(t>300)return new Ke(n.length);const i=e.merge(n.bracketIds),r=this.parseList(i,t+1),s=this.tokenizer.peek();return s&&2===s.kind&&(s.bracketId===n.bracketId||s.bracketIds.intersects(n.bracketIds))?(this.tokenizer.read(),Fe.create(n.astNode,r,s.astNode)):Fe.create(n.astNode,r,null)}default:throw new Error("unexpected")}}}function ht(e,t){if(0===e.length)return t;if(0===t.length)return e;const n=new o.j3(ct(e)),i=ct(t);i.push({modified:!1,lengthBefore:void 0,lengthAfter:void 0});let r=n.dequeue();function s(e){if(void 0===e){const e=n.takeWhile((e=>!0))||[];return r&&e.unshift(r),e}const t=[];for(;r&&!pe(e);){const[i,s]=r.splitAt(e);t.push(i),e=we(i.lengthAfter,e),r=s??n.dequeue()}return pe(e)||t.push(new ut(!1,e,e)),t}const a=[];function l(e,t,n){if(a.length>0&&Le(a[a.length-1].endOffset,e)){const e=a[a.length-1];a[a.length-1]=new Ie(e.startOffset,t,Ce(e.newLength,n))}else a.push({startOffset:e,endOffset:t,newLength:n})}let h=0;for(const e of i){const t=s(e.lengthBefore);if(e.modified){const n=Ce(h,ve(t,(e=>e.lengthBefore)));l(h,n,e.lengthAfter),h=n}else for(const e of t){const t=h;h=Ce(h,e.lengthBefore),e.modified&&l(t,h,e.lengthAfter)}}return a}class ut{constructor(e,t,n){this.modified=e,this.lengthBefore=t,this.lengthAfter=n}splitAt(e){const t=we(e,this.lengthAfter);return Le(t,0)?[this,void 0]:this.modified?[new ut(this.modified,this.lengthBefore,e),new ut(this.modified,0,t)]:[new ut(this.modified,e,e),new ut(this.modified,t,t)]}toString(){return`${this.modified?"M":"U"}:${ke(this.lengthBefore)} -> ${ke(this.lengthAfter)}`}}function ct(e){const t=[];let n=0;for(const i of e){const e=we(n,i.startOffset);pe(e)||t.push(new ut(!1,e,e));const r=we(i.startOffset,i.endOffset);t.push(new ut(!0,r,i.newLength)),n=i.endOffset}return t}class dt extends r.jG{didLanguageChange(e){return this.brackets.didLanguageChange(e)}constructor(e,t){if(super(),this.textModel=e,this.getLanguageConfiguration=t,this.didChangeEmitter=new i.vl,this.denseKeyProvider=new Oe,this.brackets=new et(this.denseKeyProvider,this.getLanguageConfiguration),this.onDidChange=this.didChangeEmitter.event,this.queuedTextEditsForInitialAstWithoutTokens=[],this.queuedTextEdits=[],e.tokenization.hasTokens)2===e.tokenization.backgroundTokenizationState?(this.initialAstWithoutTokens=void 0,this.astWithTokens=this.parseDocumentFromTextBuffer([],void 0,!1)):(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer([],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens);else{const e=this.brackets.getSingleLanguageBracketTokens(this.textModel.getLanguageId()),t=new Ze(this.textModel.getValue(),e);this.initialAstWithoutTokens=at(t,[],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens}}handleDidChangeBackgroundTokenizationState(){if(2===this.textModel.tokenization.backgroundTokenizationState){const e=void 0===this.initialAstWithoutTokens;this.initialAstWithoutTokens=void 0,e||this.didChangeEmitter.fire()}}handleDidChangeTokens({ranges:e}){const t=e.map((e=>new Ie(be(e.fromLineNumber-1,0),be(e.toLineNumber,0),be(e.toLineNumber-e.fromLineNumber+1,0))));this.handleEdits(t,!0),this.initialAstWithoutTokens||this.didChangeEmitter.fire()}handleContentChanged(e){const t=Ie.fromModelContentChanges(e.changes);this.handleEdits(t,!1)}handleEdits(e,t){const n=ht(this.queuedTextEdits,e);this.queuedTextEdits=n,this.initialAstWithoutTokens&&!t&&(this.queuedTextEditsForInitialAstWithoutTokens=ht(this.queuedTextEditsForInitialAstWithoutTokens,e))}flushQueue(){this.queuedTextEdits.length>0&&(this.astWithTokens=this.parseDocumentFromTextBuffer(this.queuedTextEdits,this.astWithTokens,!1),this.queuedTextEdits=[]),this.queuedTextEditsForInitialAstWithoutTokens.length>0&&(this.initialAstWithoutTokens&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer(this.queuedTextEditsForInitialAstWithoutTokens,this.initialAstWithoutTokens,!1)),this.queuedTextEditsForInitialAstWithoutTokens=[])}parseDocumentFromTextBuffer(e,t,n){const i=t;return at(new Ye(this.textModel,this.brackets),e,i,n)}getBracketsInRange(e,t){this.flushQueue();const n=be(e.startLineNumber-1,e.startColumn-1),i=be(e.endLineNumber-1,e.endColumn-1);return new o.c1((e=>{const r=this.initialAstWithoutTokens||this.astWithTokens;mt(r,0,r.length,n,i,e,0,0,new Map,t)}))}getBracketPairsInRange(e,t){this.flushQueue();const n=Ee(e.getStartPosition()),i=Ee(e.getEndPosition());return new o.c1((e=>{const r=this.initialAstWithoutTokens||this.astWithTokens,s=new pt(e,t,this.textModel);_t(r,0,r.length,n,i,s,0,new Map)}))}getFirstBracketAfter(e){this.flushQueue();const t=this.initialAstWithoutTokens||this.astWithTokens;return ft(t,0,t.length,Ee(e))}getFirstBracketBefore(e){this.flushQueue();const t=this.initialAstWithoutTokens||this.astWithTokens;return gt(t,0,t.length,Ee(e))}}function gt(e,t,n,i){if(4===e.kind||2===e.kind){const r=[];for(const i of e.children)n=Ce(t,i.length),r.push({nodeOffsetStart:t,nodeOffsetEnd:n}),t=n;for(let t=r.length-1;t>=0;t--){const{nodeOffsetStart:n,nodeOffsetEnd:s}=r[t];if(ye(n,i)){const r=gt(e.children[t],n,s,i);if(r)return r}}return null}if(3===e.kind)return null;if(1===e.kind){const i=Ne(t,n);return{bracketInfo:e.bracketInfo,range:i}}return null}function ft(e,t,n,i){if(4===e.kind||2===e.kind){for(const r of e.children){if(ye(i,n=Ce(t,r.length))){const e=ft(r,t,n,i);if(e)return e}t=n}return null}if(3===e.kind)return null;if(1===e.kind){const i=Ne(t,n);return{bracketInfo:e.bracketInfo,range:i}}return null}function mt(e,t,n,i,r,s,o,a,l,h,u=!1){if(o>200)return!0;e:for(;;)switch(e.kind){case 4:{const a=e.childrenLength;for(let u=0;u<a;u++){const a=e.getChild(u);if(a){if(n=Ce(t,a.length),Se(t,r)&&xe(n,i)){if(xe(n,r)){e=a;continue e}if(!mt(a,t,n,i,r,s,o,0,l,h))return!1}t=n}}return!0}case 2:{const u=!h||!e.closingBracket||e.closingBracket.bracketInfo.closesColorized(e.openingBracket.bracketInfo);let c=0;if(l){let t=l.get(e.openingBracket.text);void 0===t&&(t=0),c=t,u&&(t++,l.set(e.openingBracket.text,t))}const d=e.childrenLength;for(let g=0;g<d;g++){const d=e.getChild(g);if(d){if(n=Ce(t,d.length),Se(t,r)&&xe(n,i)){if(xe(n,r)&&1!==d.kind){e=d,u?(o++,a=c+1):a=c;continue e}if((u||1!==d.kind||!e.closingBracket)&&!mt(d,t,n,i,r,s,u?o+1:o,u?c+1:c,l,h,!e.closingBracket))return!1}t=n}}return l?.set(e.openingBracket.text,c),!0}case 3:{const e=Ne(t,n);return s(new de(e,o-1,0,!0))}case 1:{const e=Ne(t,n);return s(new de(e,o-1,a-1,u))}case 0:return!0}}class pt{constructor(e,t,n){this.push=e,this.includeMinIndentation=t,this.textModel=n}}function _t(e,t,n,i,r,s,o,a){if(o>200)return!0;let l=!0;if(2===e.kind){let h=0;if(a){let t=a.get(e.openingBracket.text);void 0===t&&(t=0),h=t,t++,a.set(e.openingBracket.text,t)}const u=Ce(t,e.openingBracket.length);let c=-1;if(s.includeMinIndentation&&(c=e.computeMinIndentation(t,s.textModel)),l=s.push(new fe(Ne(t,n),Ne(t,u),e.closingBracket?Ne(Ce(u,e.child?.length||0),n):void 0,o,h,e,c)),t=u,l&&e.child){const h=e.child;if(n=Ce(t,h.length),Se(t,r)&&xe(n,i)&&(l=_t(h,t,n,i,r,s,o+1,a),!l))return!1}a?.set(e.openingBracket.text,h)}else{let n=t;for(const t of e.children){const e=n;if(n=Ce(n,t.length),Se(e,r)&&Se(i,n)&&(l=_t(t,e,n,i,r,s,o,a),!l))return!1}}return l}class bt extends r.jG{get canBuildAST(){return this.textModel.getValueLength()<=5e6}constructor(e,t){super(),this.textModel=e,this.languageConfigurationService=t,this.bracketPairsTree=this._register(new r.HE),this.onDidChangeEmitter=new i.vl,this.onDidChange=this.onDidChangeEmitter.event,this.bracketsRequested=!1}handleLanguageConfigurationServiceChange(e){e.languageId&&!this.bracketPairsTree.value?.object.didLanguageChange(e.languageId)||(this.bracketPairsTree.clear(),this.updateBracketPairsTree())}handleDidChangeOptions(e){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeLanguage(e){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeContent(e){this.bracketPairsTree.value?.object.handleContentChanged(e)}handleDidChangeBackgroundTokenizationState(){this.bracketPairsTree.value?.object.handleDidChangeBackgroundTokenizationState()}handleDidChangeTokens(e){this.bracketPairsTree.value?.object.handleDidChangeTokens(e)}updateBracketPairsTree(){if(this.bracketsRequested&&this.canBuildAST){if(!this.bracketPairsTree.value){const n=new r.Cm;this.bracketPairsTree.value=(e=n.add(new dt(this.textModel,(e=>this.languageConfigurationService.getLanguageConfiguration(e)))),t=n,{object:e,dispose:()=>t?.dispose()}),n.add(this.bracketPairsTree.value.object.onDidChange((e=>this.onDidChangeEmitter.fire(e)))),this.onDidChangeEmitter.fire()}}else this.bracketPairsTree.value&&(this.bracketPairsTree.clear(),this.onDidChangeEmitter.fire());var e,t}getBracketPairsInRange(e){return this.bracketsRequested=!0,this.updateBracketPairsTree(),this.bracketPairsTree.value?.object.getBracketPairsInRange(e,!1)||o.c1.empty}getBracketPairsInRangeWithMinIndentation(e){return this.bracketsRequested=!0,this.updateBracketPairsTree(),this.bracketPairsTree.value?.object.getBracketPairsInRange(e,!0)||o.c1.empty}getBracketsInRange(e,t=!1){return this.bracketsRequested=!0,this.updateBracketPairsTree(),this.bracketPairsTree.value?.object.getBracketsInRange(e,t)||o.c1.empty}findMatchingBracketUp(e,t,n){const i=this.textModel.validatePosition(t),r=this.textModel.getLanguageIdAtPosition(i.lineNumber,i.column);if(this.canBuildAST){const n=this.languageConfigurationService.getLanguageConfiguration(r).bracketsNew.getClosingBracketInfo(e);if(!n)return null;const i=this.getBracketPairsInRange(f.Q.fromPositions(t,t)).findLast((e=>n.closes(e.openingBracketInfo)));return i?i.openingBracketRange:null}{const t=e.toLowerCase(),s=this.languageConfigurationService.getLanguageConfiguration(r).brackets;if(!s)return null;const o=s.textIsBracket[t];return o?vt(this._findMatchingBracketUp(o,i,kt(n))):null}}matchBracket(e,t){if(this.canBuildAST){const t=this.getBracketPairsInRange(f.Q.fromPositions(e,e)).filter((t=>void 0!==t.closingBracketRange&&(t.openingBracketRange.containsPosition(e)||t.closingBracketRange.containsPosition(e)))).findLastMaxBy((0,o.VE)((t=>t.openingBracketRange.containsPosition(e)?t.openingBracketRange:t.closingBracketRange),f.Q.compareRangesUsingStarts));return t?[t.openingBracketRange,t.closingBracketRange]:null}{const n=kt(t);return this._matchBracket(this.textModel.validatePosition(e),n)}}_establishBracketSearchOffsets(e,t,n,i){const r=t.getCount(),s=t.getLanguageId(i);let o=Math.max(0,e.column-1-n.maxBracketLength);for(let e=i-1;e>=0;e--){const n=t.getEndOffset(e);if(n<=o)break;if(y(t.getStandardTokenType(e))||t.getLanguageId(e)!==s){o=n;break}}let a=Math.min(t.getLineContent().length,e.column-1+n.maxBracketLength);for(let e=i+1;e<r;e++){const n=t.getStartOffset(e);if(n>=a)break;if(y(t.getStandardTokenType(e))||t.getLanguageId(e)!==s){a=n;break}}return{searchStartOffset:o,searchEndOffset:a}}_matchBracket(e,t){const n=e.lineNumber,i=this.textModel.tokenization.getLineTokens(n),r=this.textModel.getLineContent(n),s=i.findTokenIndexAtOffset(e.column-1);if(s<0)return null;const o=this.languageConfigurationService.getLanguageConfiguration(i.getLanguageId(s)).brackets;if(o&&!y(i.getStandardTokenType(s))){let{searchStartOffset:a,searchEndOffset:l}=this._establishBracketSearchOffsets(e,i,o,s),h=null;for(;;){const i=P.findNextBracketInRange(o.forwardRegex,n,r,a,l);if(!i)break;if(i.startColumn<=e.column&&e.column<=i.endColumn){const e=r.substring(i.startColumn-1,i.endColumn-1).toLowerCase(),n=this._matchFoundBracket(i,o.textIsBracket[e],o.textIsOpenBracket[e],t);if(n){if(n instanceof Ct)return null;h=n}}a=i.endColumn-1}if(h)return h}if(s>0&&i.getStartOffset(s)===e.column-1){const o=s-1,a=this.languageConfigurationService.getLanguageConfiguration(i.getLanguageId(o)).brackets;if(a&&!y(i.getStandardTokenType(o))){const{searchStartOffset:s,searchEndOffset:l}=this._establishBracketSearchOffsets(e,i,a,o),h=P.findPrevBracketInRange(a.reversedRegex,n,r,s,l);if(h&&h.startColumn<=e.column&&e.column<=h.endColumn){const e=r.substring(h.startColumn-1,h.endColumn-1).toLowerCase(),n=this._matchFoundBracket(h,a.textIsBracket[e],a.textIsOpenBracket[e],t);if(n)return n instanceof Ct?null:n}}}return null}_matchFoundBracket(e,t,n,i){if(!t)return null;const r=n?this._findMatchingBracketDown(t,e.getEndPosition(),i):this._findMatchingBracketUp(t,e.getStartPosition(),i);return r?r instanceof Ct?r:[e,r]:null}_findMatchingBracketUp(e,t,n){const i=e.languageId,r=e.reversedRegex;let s=-1,o=0;const a=(t,i,a,l)=>{for(;;){if(n&&++o%100==0&&!n())return Ct.INSTANCE;const h=P.findPrevBracketInRange(r,t,i,a,l);if(!h)break;const u=i.substring(h.startColumn-1,h.endColumn-1).toLowerCase();if(e.isOpen(u)?s++:e.isClose(u)&&s--,0===s)return h;l=h.startColumn-1}return null};for(let e=t.lineNumber;e>=1;e--){const n=this.textModel.tokenization.getLineTokens(e),r=n.getCount(),s=this.textModel.getLineContent(e);let o=r-1,l=s.length,h=s.length;e===t.lineNumber&&(o=n.findTokenIndexAtOffset(t.column-1),l=t.column-1,h=t.column-1);let u=!0;for(;o>=0;o--){const t=n.getLanguageId(o)===i&&!y(n.getStandardTokenType(o));if(t)u?l=n.getStartOffset(o):(l=n.getStartOffset(o),h=n.getEndOffset(o));else if(u&&l!==h){const t=a(e,s,l,h);if(t)return t}u=t}if(u&&l!==h){const t=a(e,s,l,h);if(t)return t}}return null}_findMatchingBracketDown(e,t,n){const i=e.languageId,r=e.forwardRegex;let s=1,o=0;const a=(t,i,a,l)=>{for(;;){if(n&&++o%100==0&&!n())return Ct.INSTANCE;const h=P.findNextBracketInRange(r,t,i,a,l);if(!h)break;const u=i.substring(h.startColumn-1,h.endColumn-1).toLowerCase();if(e.isOpen(u)?s++:e.isClose(u)&&s--,0===s)return h;a=h.endColumn-1}return null},l=this.textModel.getLineCount();for(let e=t.lineNumber;e<=l;e++){const n=this.textModel.tokenization.getLineTokens(e),r=n.getCount(),s=this.textModel.getLineContent(e);let o=0,l=0,h=0;e===t.lineNumber&&(o=n.findTokenIndexAtOffset(t.column-1),l=t.column-1,h=t.column-1);let u=!0;for(;o<r;o++){const t=n.getLanguageId(o)===i&&!y(n.getStandardTokenType(o));if(t)u||(l=n.getStartOffset(o)),h=n.getEndOffset(o);else if(u&&l!==h){const t=a(e,s,l,h);if(t)return t}u=t}if(u&&l!==h){const t=a(e,s,l,h);if(t)return t}}return null}findPrevBracket(e){const t=this.textModel.validatePosition(e);if(this.canBuildAST)return this.bracketsRequested=!0,this.updateBracketPairsTree(),this.bracketPairsTree.value?.object.getFirstBracketBefore(t)||null;let n=null,i=null,r=null;for(let e=t.lineNumber;e>=1;e--){const s=this.textModel.tokenization.getLineTokens(e),o=s.getCount(),a=this.textModel.getLineContent(e);let l=o-1,h=a.length,u=a.length;if(e===t.lineNumber){l=s.findTokenIndexAtOffset(t.column-1),h=t.column-1,u=t.column-1;const e=s.getLanguageId(l);n!==e&&(n=e,i=this.languageConfigurationService.getLanguageConfiguration(n).brackets,r=this.languageConfigurationService.getLanguageConfiguration(n).bracketsNew)}let c=!0;for(;l>=0;l--){const t=s.getLanguageId(l);if(n!==t){if(i&&r&&c&&h!==u){const t=P.findPrevBracketInRange(i.reversedRegex,e,a,h,u);if(t)return this._toFoundBracket(r,t);c=!1}n=t,i=this.languageConfigurationService.getLanguageConfiguration(n).brackets,r=this.languageConfigurationService.getLanguageConfiguration(n).bracketsNew}const o=!!i&&!y(s.getStandardTokenType(l));if(o)c?h=s.getStartOffset(l):(h=s.getStartOffset(l),u=s.getEndOffset(l));else if(r&&i&&c&&h!==u){const t=P.findPrevBracketInRange(i.reversedRegex,e,a,h,u);if(t)return this._toFoundBracket(r,t)}c=o}if(r&&i&&c&&h!==u){const t=P.findPrevBracketInRange(i.reversedRegex,e,a,h,u);if(t)return this._toFoundBracket(r,t)}}return null}findNextBracket(e){const t=this.textModel.validatePosition(e);if(this.canBuildAST)return this.bracketsRequested=!0,this.updateBracketPairsTree(),this.bracketPairsTree.value?.object.getFirstBracketAfter(t)||null;const n=this.textModel.getLineCount();let i=null,r=null,s=null;for(let e=t.lineNumber;e<=n;e++){const n=this.textModel.tokenization.getLineTokens(e),o=n.getCount(),a=this.textModel.getLineContent(e);let l=0,h=0,u=0;if(e===t.lineNumber){l=n.findTokenIndexAtOffset(t.column-1),h=t.column-1,u=t.column-1;const e=n.getLanguageId(l);i!==e&&(i=e,r=this.languageConfigurationService.getLanguageConfiguration(i).brackets,s=this.languageConfigurationService.getLanguageConfiguration(i).bracketsNew)}let c=!0;for(;l<o;l++){const t=n.getLanguageId(l);if(i!==t){if(s&&r&&c&&h!==u){const t=P.findNextBracketInRange(r.forwardRegex,e,a,h,u);if(t)return this._toFoundBracket(s,t);c=!1}i=t,r=this.languageConfigurationService.getLanguageConfiguration(i).brackets,s=this.languageConfigurationService.getLanguageConfiguration(i).bracketsNew}const o=!!r&&!y(n.getStandardTokenType(l));if(o)c||(h=n.getStartOffset(l)),u=n.getEndOffset(l);else if(s&&r&&c&&h!==u){const t=P.findNextBracketInRange(r.forwardRegex,e,a,h,u);if(t)return this._toFoundBracket(s,t)}c=o}if(s&&r&&c&&h!==u){const t=P.findNextBracketInRange(r.forwardRegex,e,a,h,u);if(t)return this._toFoundBracket(s,t)}}return null}findEnclosingBrackets(e,t){const n=this.textModel.validatePosition(e);if(this.canBuildAST){const e=f.Q.fromPositions(n),t=this.getBracketPairsInRange(f.Q.fromPositions(n,n)).findLast((t=>void 0!==t.closingBracketRange&&t.range.strictContainsRange(e)));return t?[t.openingBracketRange,t.closingBracketRange]:null}const i=kt(t),r=this.textModel.getLineCount(),s=new Map;let o=[];const a=(e,t)=>{if(!s.has(e)){const n=[];for(let e=0,i=t?t.brackets.length:0;e<i;e++)n[e]=0;s.set(e,n)}o=s.get(e)};let l=0;const h=(e,t,n,r,s)=>{for(;;){if(i&&++l%100==0&&!i())return Ct.INSTANCE;const a=P.findNextBracketInRange(e.forwardRegex,t,n,r,s);if(!a)break;const h=n.substring(a.startColumn-1,a.endColumn-1).toLowerCase(),u=e.textIsBracket[h];if(u&&(u.isOpen(h)?o[u.index]++:u.isClose(h)&&o[u.index]--,-1===o[u.index]))return this._matchFoundBracket(a,u,!1,i);r=a.endColumn-1}return null};let u=null,c=null;for(let e=n.lineNumber;e<=r;e++){const t=this.textModel.tokenization.getLineTokens(e),i=t.getCount(),r=this.textModel.getLineContent(e);let s=0,o=0,l=0;if(e===n.lineNumber){s=t.findTokenIndexAtOffset(n.column-1),o=n.column-1,l=n.column-1;const e=t.getLanguageId(s);u!==e&&(u=e,c=this.languageConfigurationService.getLanguageConfiguration(u).brackets,a(u,c))}let d=!0;for(;s<i;s++){const n=t.getLanguageId(s);if(u!==n){if(c&&d&&o!==l){const t=h(c,e,r,o,l);if(t)return vt(t);d=!1}u=n,c=this.languageConfigurationService.getLanguageConfiguration(u).brackets,a(u,c)}const i=!!c&&!y(t.getStandardTokenType(s));if(i)d||(o=t.getStartOffset(s)),l=t.getEndOffset(s);else if(c&&d&&o!==l){const t=h(c,e,r,o,l);if(t)return vt(t)}d=i}if(c&&d&&o!==l){const t=h(c,e,r,o,l);if(t)return vt(t)}}return null}_toFoundBracket(e,t){if(!t)return null;let n=this.textModel.getValueInRange(t);n=n.toLowerCase();const i=e.getBracketInfo(n);return i?{range:t,bracketInfo:i}:null}}function kt(e){if(void 0===e)return()=>!0;{const t=Date.now();return()=>Date.now()-t<=e}}class Ct{static{this.INSTANCE=new Ct}constructor(){this._searchCanceledBrand=void 0}}function vt(e){return e instanceof Ct?null:e}var Lt=n(8295),wt=n(5295);class yt extends r.jG{constructor(e){super(),this.textModel=e,this.colorProvider=new St,this.onDidChangeEmitter=new i.vl,this.onDidChange=this.onDidChangeEmitter.event,this.colorizationOptions=e.getOptions().bracketPairColorizationOptions,this._register(e.bracketPairs.onDidChange((e=>{this.onDidChangeEmitter.fire()})))}handleDidChangeOptions(e){this.colorizationOptions=this.textModel.getOptions().bracketPairColorizationOptions}getDecorationsInRange(e,t,n,i){return i||void 0===t?[]:this.colorizationOptions.enabled?this.textModel.bracketPairs.getBracketsInRange(e,!0).map((e=>({id:`bracket${e.range.toString()}-${e.nestingLevel}`,options:{description:"BracketPairColorization",inlineClassName:this.colorProvider.getInlineClassName(e,this.colorizationOptions.independentColorPoolPerBracketType)},ownerId:0,range:e.range}))).toArray():[]}getAllDecorations(e,t){return void 0===e?[]:this.colorizationOptions.enabled?this.getDecorationsInRange(new f.Q(1,1,this.textModel.getLineCount(),1),e,t):[]}}class St{constructor(){this.unexpectedClosingBracketClassName="unexpected-closing-bracket"}getInlineClassName(e,t){return e.isInvalid?this.unexpectedClosingBracketClassName:this.getInlineClassNameOfLevel(t?e.nestingLevelOfEqualBracketType:e.nestingLevel)}getInlineClassNameOfLevel(e){return"bracket-highlighting-"+e%30}}(0,wt.zy)(((e,t)=>{const n=[Lt.sN,Lt.lQ,Lt.ss,Lt.l5,Lt.sH,Lt.zp],i=new St;t.addRule(`.monaco-editor .${i.unexpectedClosingBracketClassName} { color: ${e.getColor(Lt.s7)}; }`);const r=n.map((t=>e.getColor(t))).filter((e=>!!e)).filter((e=>!e.isTransparent()));for(let e=0;e<30;e++){const n=r[e%r.length];t.addRule(`.monaco-editor .${i.getInlineClassNameOfLevel(e)} { color: ${n}; }`)}}));var xt=n(9746);function Et(e){return e.replace(/\n/g,"\\n").replace(/\r/g,"\\r")}class Nt{get oldLength(){return this.oldText.length}get oldEnd(){return this.oldPosition+this.oldText.length}get newLength(){return this.newText.length}get newEnd(){return this.newPosition+this.newText.length}constructor(e,t,n,i){this.oldPosition=e,this.oldText=t,this.newPosition=n,this.newText=i}toString(){return 0===this.oldText.length?`(insert@${this.oldPosition} "${Et(this.newText)}")`:0===this.newText.length?`(delete@${this.oldPosition} "${Et(this.oldText)}")`:`(replace@${this.oldPosition} "${Et(this.oldText)}" with "${Et(this.newText)}")`}static _writeStringSize(e){return 4+2*e.length}static _writeString(e,t,n){const i=t.length;S.Sw(e,i,n),n+=4;for(let r=0;r<i;r++)S.gN(e,t.charCodeAt(r),n),n+=2;return n}static _readString(e,t){const n=S.bb(e,t);return function(e,t,n){const i=new Uint16Array(e.buffer,t,n);return n>0&&(65279===i[0]||65534===i[0])?function(e,t,n){const i=[];let r=0;for(let s=0;s<n;s++){const n=S.$l(e,t);t+=2,i[r++]=String.fromCharCode(n)}return i.join("")}(e,t,n):I().decode(i)}(e,t+=4,n)}writeSize(){return 8+Nt._writeStringSize(this.oldText)+Nt._writeStringSize(this.newText)}write(e,t){return S.Sw(e,this.oldPosition,t),t+=4,S.Sw(e,this.newPosition,t),t+=4,t=Nt._writeString(e,this.oldText,t),Nt._writeString(e,this.newText,t)}static read(e,t,n){const i=S.bb(e,t);t+=4;const r=S.bb(e,t);t+=4;const s=Nt._readString(e,t);t+=Nt._writeStringSize(s);const o=Nt._readString(e,t);return t+=Nt._writeStringSize(o),n.push(new Nt(i,s,r,o)),t}}class It{constructor(e,t){this._prevEdits=e,this._currEdits=t,this._result=[],this._resultLen=0,this._prevLen=this._prevEdits.length,this._prevDeltaOffset=0,this._currLen=this._currEdits.length,this._currDeltaOffset=0}compress(){let e=0,t=0,n=this._getPrev(e),i=this._getCurr(t);for(;e<this._prevLen||t<this._currLen;){if(null===n){this._acceptCurr(i),i=this._getCurr(++t);continue}if(null===i){this._acceptPrev(n),n=this._getPrev(++e);continue}if(i.oldEnd<=n.newPosition){this._acceptCurr(i),i=this._getCurr(++t);continue}if(n.newEnd<=i.oldPosition){this._acceptPrev(n),n=this._getPrev(++e);continue}if(i.oldPosition<n.newPosition){const[e,t]=It._splitCurr(i,n.newPosition-i.oldPosition);this._acceptCurr(e),i=t;continue}if(n.newPosition<i.oldPosition){const[e,t]=It._splitPrev(n,i.oldPosition-n.newPosition);this._acceptPrev(e),n=t;continue}let r,s;if(i.oldEnd===n.newEnd)r=n,s=i,n=this._getPrev(++e),i=this._getCurr(++t);else if(i.oldEnd<n.newEnd){const[e,o]=It._splitPrev(n,i.oldLength);r=e,s=i,n=o,i=this._getCurr(++t)}else{const[t,o]=It._splitCurr(i,n.newLength);r=n,s=t,n=this._getPrev(++e),i=o}this._result[this._resultLen++]=new Nt(r.oldPosition,r.oldText,s.newPosition,s.newText),this._prevDeltaOffset+=r.newLength-r.oldLength,this._currDeltaOffset+=s.newLength-s.oldLength}const r=It._merge(this._result);return It._removeNoOps(r)}_acceptCurr(e){this._result[this._resultLen++]=It._rebaseCurr(this._prevDeltaOffset,e),this._currDeltaOffset+=e.newLength-e.oldLength}_getCurr(e){return e<this._currLen?this._currEdits[e]:null}_acceptPrev(e){this._result[this._resultLen++]=It._rebasePrev(this._currDeltaOffset,e),this._prevDeltaOffset+=e.newLength-e.oldLength}_getPrev(e){return e<this._prevLen?this._prevEdits[e]:null}static _rebaseCurr(e,t){return new Nt(t.oldPosition-e,t.oldText,t.newPosition,t.newText)}static _rebasePrev(e,t){return new Nt(t.oldPosition,t.oldText,t.newPosition+e,t.newText)}static _splitPrev(e,t){const n=e.newText.substr(0,t),i=e.newText.substr(t);return[new Nt(e.oldPosition,e.oldText,e.newPosition,n),new Nt(e.oldEnd,"",e.newPosition+t,i)]}static _splitCurr(e,t){const n=e.oldText.substr(0,t),i=e.oldText.substr(t);return[new Nt(e.oldPosition,n,e.newPosition,e.newText),new Nt(e.oldPosition+t,i,e.newEnd,"")]}static _merge(e){if(0===e.length)return e;const t=[];let n=0,i=e[0];for(let r=1;r<e.length;r++){const s=e[r];i.oldEnd===s.oldPosition?i=new Nt(i.oldPosition,i.oldText+s.oldText,i.newPosition,i.newText+s.newText):(t[n++]=i,i=s)}return t[n++]=i,t}static _removeNoOps(e){if(0===e.length)return e;const t=[];let n=0;for(let i=0;i<e.length;i++){const r=e[i];r.oldText!==r.newText&&(t[n++]=r)}return t}}var Tt=n(2467);function At(e){return e.toString()}class Rt{static create(e,t){const n=e.getAlternativeVersionId(),i=Ot(e);return new Rt(n,n,i,i,t,t,[])}constructor(e,t,n,i,r,s,o){this.beforeVersionId=e,this.afterVersionId=t,this.beforeEOL=n,this.afterEOL=i,this.beforeCursorState=r,this.afterCursorState=s,this.changes=o}append(e,t,n,i,r){var s,o;t.length>0&&(this.changes=(o=t,null===(s=this.changes)||0===s.length?o:new It(s,o).compress())),this.afterEOL=n,this.afterVersionId=i,this.afterCursorState=r}static _writeSelectionsSize(e){return 4+16*(e?e.length:0)}static _writeSelections(e,t,n){if(S.Sw(e,t?t.length:0,n),n+=4,t)for(const i of t)S.Sw(e,i.selectionStartLineNumber,n),n+=4,S.Sw(e,i.selectionStartColumn,n),n+=4,S.Sw(e,i.positionLineNumber,n),n+=4,S.Sw(e,i.positionColumn,n),n+=4;return n}static _readSelections(e,t,n){const i=S.bb(e,t);t+=4;for(let r=0;r<i;r++){const i=S.bb(e,t);t+=4;const r=S.bb(e,t);t+=4;const s=S.bb(e,t);t+=4;const o=S.bb(e,t);t+=4,n.push(new m.L(i,r,s,o))}return t}serialize(){let e=10+Rt._writeSelectionsSize(this.beforeCursorState)+Rt._writeSelectionsSize(this.afterCursorState)+4;for(const t of this.changes)e+=t.writeSize();const t=new Uint8Array(e);let n=0;S.Sw(t,this.beforeVersionId,n),n+=4,S.Sw(t,this.afterVersionId,n),n+=4,S.Gs(t,this.beforeEOL,n),n+=1,S.Gs(t,this.afterEOL,n),n+=1,n=Rt._writeSelections(t,this.beforeCursorState,n),n=Rt._writeSelections(t,this.afterCursorState,n),S.Sw(t,this.changes.length,n),n+=4;for(const e of this.changes)n=e.write(t,n);return t.buffer}static deserialize(e){const t=new Uint8Array(e);let n=0;const i=S.bb(t,n);n+=4;const r=S.bb(t,n);n+=4;const s=S.pJ(t,n);n+=1;const o=S.pJ(t,n);n+=1;const a=[];n=Rt._readSelections(t,n,a);const l=[];n=Rt._readSelections(t,n,l);const h=S.bb(t,n);n+=4;const u=[];for(let e=0;e<h;e++)n=Nt.read(t,n,u);return new Rt(i,r,s,o,a,l,u)}}class Mt{get type(){return 0}get resource(){return u.r.isUri(this.model)?this.model:this.model.uri}constructor(e,t,n,i){this.label=e,this.code=t,this.model=n,this._data=Rt.create(n,i)}toString(){return(this._data instanceof Rt?this._data:Rt.deserialize(this._data)).changes.map((e=>e.toString())).join(", ")}matchesResource(e){return(u.r.isUri(this.model)?this.model:this.model.uri).toString()===e.toString()}setModel(e){this.model=e}canAppend(e){return this.model===e&&this._data instanceof Rt}append(e,t,n,i,r){this._data instanceof Rt&&this._data.append(e,t,n,i,r)}close(){this._data instanceof Rt&&(this._data=this._data.serialize())}open(){this._data instanceof Rt||(this._data=Rt.deserialize(this._data))}undo(){if(u.r.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof Rt&&(this._data=this._data.serialize());const e=Rt.deserialize(this._data);this.model._applyUndo(e.changes,e.beforeEOL,e.beforeVersionId,e.beforeCursorState)}redo(){if(u.r.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof Rt&&(this._data=this._data.serialize());const e=Rt.deserialize(this._data);this.model._applyRedo(e.changes,e.afterEOL,e.afterVersionId,e.afterCursorState)}heapSize(){return this._data instanceof Rt&&(this._data=this._data.serialize()),this._data.byteLength+168}}class Dt{get resources(){return this._editStackElementsArr.map((e=>e.resource))}constructor(e,t,n){this.label=e,this.code=t,this.type=1,this._isOpen=!0,this._editStackElementsArr=n.slice(0),this._editStackElementsMap=new Map;for(const e of this._editStackElementsArr){const t=At(e.resource);this._editStackElementsMap.set(t,e)}this._delegate=null}prepareUndoRedo(){if(this._delegate)return this._delegate.prepareUndoRedo(this)}matchesResource(e){const t=At(e);return this._editStackElementsMap.has(t)}setModel(e){const t=At(u.r.isUri(e)?e:e.uri);this._editStackElementsMap.has(t)&&this._editStackElementsMap.get(t).setModel(e)}canAppend(e){if(!this._isOpen)return!1;const t=At(e.uri);return!!this._editStackElementsMap.has(t)&&this._editStackElementsMap.get(t).canAppend(e)}append(e,t,n,i,r){const s=At(e.uri);this._editStackElementsMap.get(s).append(e,t,n,i,r)}close(){this._isOpen=!1}open(){}undo(){this._isOpen=!1;for(const e of this._editStackElementsArr)e.undo()}redo(){for(const e of this._editStackElementsArr)e.redo()}heapSize(e){const t=At(e);return this._editStackElementsMap.has(t)?this._editStackElementsMap.get(t).heapSize():0}split(){return this._editStackElementsArr}toString(){const e=[];for(const t of this._editStackElementsArr)e.push(`${(0,Tt.P8)(t.resource)}: ${t}`);return`{${e.join(", ")}}`}}function Ot(e){return"\n"===e.getEOL()?0:1}function Bt(e){return!!e&&(e instanceof Mt||e instanceof Dt)}class Ft{constructor(e,t){this._model=e,this._undoRedoService=t}pushStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);Bt(e)&&e.close()}popStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);Bt(e)&&e.open()}clear(){this._undoRedoService.removeElements(this._model.uri)}_getOrCreateEditStackElement(e,t){const n=this._undoRedoService.getLastElement(this._model.uri);if(Bt(n)&&n.canAppend(this._model))return n;const i=new Mt(xt.kg("edit","Typing"),"undoredo.textBufferEdit",this._model,e);return this._undoRedoService.pushElement(i,t),i}pushEOL(e){const t=this._getOrCreateEditStackElement(null,void 0);this._model.setEOL(e),t.append(this._model,[],Ot(this._model),this._model.getAlternativeVersionId(),null)}pushEditOperation(e,t,n,i){const r=this._getOrCreateEditStackElement(e,i),s=this._model.applyEdits(t,!0),o=Ft._computeCursorState(n,s),a=s.map(((e,t)=>({index:t,textChange:e.textChange})));return a.sort(((e,t)=>e.textChange.oldPosition===t.textChange.oldPosition?e.index-t.index:e.textChange.oldPosition-t.textChange.oldPosition)),r.append(this._model,a.map((e=>e.textChange)),Ot(this._model),this._model.getAlternativeVersionId(),o),o}static _computeCursorState(e,t){try{return e?e(t):null}catch(e){return(0,l.dz)(e),null}}}var Pt,zt=n(7393);class Vt extends r.jG{constructor(){super(...arguments),this._isDisposed=!1}dispose(){super.dispose(),this._isDisposed=!0}assertNotDisposed(){if(this._isDisposed)throw new Error("TextModelPart is disposed!")}}!function(e){e[e.Disabled=0]="Disabled",e[e.EnabledForActive=1]="EnabledForActive",e[e.Enabled=2]="Enabled"}(Pt||(Pt={}));class qt{constructor(e,t,n,i,r,s){if(this.visibleColumn=e,this.column=t,this.className=n,this.horizontalLine=i,this.forWrappedLinesAfterColumn=r,this.forWrappedLinesBeforeOrAtColumn=s,-1!==e==(-1!==t))throw new Error}}class Wt{constructor(e,t){this.top=e,this.endColumn=t}}class Ht extends Vt{constructor(e,t){super(),this.textModel=e,this.languageConfigurationService=t}getLanguageConfiguration(e){return this.languageConfigurationService.getLanguageConfiguration(e)}_computeIndentLevel(e){return function(e,t){let n=0,i=0;const r=e.length;for(;i<r;){const r=e.charCodeAt(i);if(32===r)n++;else{if(9!==r)break;n=n-n%t+t}i++}return i===r?-1:n}(this.textModel.getLineContent(e+1),this.textModel.getOptions().tabSize)}getActiveIndentGuide(e,t,n){this.assertNotDisposed();const i=this.textModel.getLineCount();if(e<1||e>i)throw new l.D7("Illegal value for lineNumber");const r=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,s=Boolean(r&&r.offSide);let o=-2,a=-1,h=-2,u=-1;const c=e=>{if(-1!==o&&(-2===o||o>e-1)){o=-1,a=-1;for(let t=e-2;t>=0;t--){const e=this._computeIndentLevel(t);if(e>=0){o=t,a=e;break}}}if(-2===h){h=-1,u=-1;for(let t=e;t<i;t++){const e=this._computeIndentLevel(t);if(e>=0){h=t,u=e;break}}}};let d=-2,g=-1,f=-2,m=-1;const p=e=>{if(-2===d){d=-1,g=-1;for(let t=e-2;t>=0;t--){const e=this._computeIndentLevel(t);if(e>=0){d=t,g=e;break}}}if(-1!==f&&(-2===f||f<e-1)){f=-1,m=-1;for(let t=e;t<i;t++){const e=this._computeIndentLevel(t);if(e>=0){f=t,m=e;break}}}};let _=0,b=!0,k=0,C=!0,v=0,L=0;for(let r=0;b||C;r++){const o=e-r,l=e+r;r>1&&(o<1||o<t)&&(b=!1),r>1&&(l>i||l>n)&&(C=!1),r>5e4&&(b=!1,C=!1);let f=-1;if(b&&o>=1){const e=this._computeIndentLevel(o-1);e>=0?(h=o-1,u=e,f=Math.ceil(e/this.textModel.getOptions().indentSize)):(c(o),f=this._getIndentLevelForWhitespaceLine(s,a,u))}let w=-1;if(C&&l<=i){const e=this._computeIndentLevel(l-1);e>=0?(d=l-1,g=e,w=Math.ceil(e/this.textModel.getOptions().indentSize)):(p(l),w=this._getIndentLevelForWhitespaceLine(s,g,m))}if(0!==r){if(1===r){if(l<=i&&w>=0&&L+1===w){b=!1,_=l,k=l,v=w;continue}if(o>=1&&f>=0&&f-1===L){C=!1,_=o,k=o,v=f;continue}if(_=e,k=e,v=L,0===v)return{startLineNumber:_,endLineNumber:k,indent:v}}b&&(f>=v?_=o:b=!1),C&&(w>=v?k=l:C=!1)}else L=f}return{startLineNumber:_,endLineNumber:k,indent:v}}getLinesBracketGuides(e,t,n,i){const r=[];for(let n=e;n<=t;n++)r.push([]);const s=this.textModel.bracketPairs.getBracketPairsInRangeWithMinIndentation(new f.Q(e,1,t,this.textModel.getLineMaxColumn(t))).toArray();let o;if(n&&s.length>0){const i=(e<=n.lineNumber&&n.lineNumber<=t?s:this.textModel.bracketPairs.getBracketPairsInRange(f.Q.fromPositions(n)).toArray()).filter((e=>f.Q.strictContainsPosition(e.range,n)));o=(0,zt.Uk)(i,(e=>true))?.range}const a=this.textModel.getOptions().bracketPairColorizationOptions.independentColorPoolPerBracketType,l=new Ut;for(const n of s){if(!n.closingBracketRange)continue;const s=o&&n.range.equalsRange(o);if(!s&&!i.includeInactive)continue;const u=l.getInlineClassName(n.nestingLevel,n.nestingLevelOfEqualBracketType,a)+(i.highlightActive&&s?" "+l.activeClassName:""),c=n.openingBracketRange.getStartPosition(),d=n.closingBracketRange.getStartPosition(),g=i.horizontalGuides===Pt.Enabled||i.horizontalGuides===Pt.EnabledForActive&&s;if(n.range.startLineNumber===n.range.endLineNumber){g&&r[n.range.startLineNumber-e].push(new qt(-1,n.openingBracketRange.getEndPosition().column,u,new Wt(!1,d.column),-1,-1));continue}const f=this.getVisibleColumnFromPosition(d),m=this.getVisibleColumnFromPosition(n.openingBracketRange.getStartPosition()),p=Math.min(m,f,n.minVisibleColumnIndentation+1);let _=!1;h.HG(this.textModel.getLineContent(n.closingBracketRange.startLineNumber))<n.closingBracketRange.startColumn-1&&(_=!0);const b=Math.max(c.lineNumber,e),k=Math.min(d.lineNumber,t),C=_?1:0;for(let t=b;t<k+C;t++)r[t-e].push(new qt(p,-1,u,null,t===c.lineNumber?c.column:-1,t===d.lineNumber?d.column:-1));g&&(c.lineNumber>=e&&m>p&&r[c.lineNumber-e].push(new qt(p,-1,u,new Wt(!1,c.column),-1,-1)),d.lineNumber<=t&&f>p&&r[d.lineNumber-e].push(new qt(p,-1,u,new Wt(!_,d.column),-1,-1)))}for(const e of r)e.sort(((e,t)=>e.visibleColumn-t.visibleColumn));return r}getVisibleColumnFromPosition(e){return d.visibleColumnFromColumn(this.textModel.getLineContent(e.lineNumber),e.column,this.textModel.getOptions().tabSize)+1}getLinesIndentGuides(e,t){this.assertNotDisposed();const n=this.textModel.getLineCount();if(e<1||e>n)throw new Error("Illegal value for startLineNumber");if(t<1||t>n)throw new Error("Illegal value for endLineNumber");const i=this.textModel.getOptions(),r=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,s=Boolean(r&&r.offSide),o=new Array(t-e+1);let a=-2,l=-1,h=-2,u=-1;for(let r=e;r<=t;r++){const t=r-e,c=this._computeIndentLevel(r-1);if(c>=0)a=r-1,l=c,o[t]=Math.ceil(c/i.indentSize);else{if(-2===a){a=-1,l=-1;for(let e=r-2;e>=0;e--){const t=this._computeIndentLevel(e);if(t>=0){a=e,l=t;break}}}if(-1!==h&&(-2===h||h<r-1)){h=-1,u=-1;for(let e=r;e<n;e++){const t=this._computeIndentLevel(e);if(t>=0){h=e,u=t;break}}}o[t]=this._getIndentLevelForWhitespaceLine(s,l,u)}}return o}_getIndentLevelForWhitespaceLine(e,t,n){const i=this.textModel.getOptions();return-1===t||-1===n?0:t<n?1+Math.floor(t/i.indentSize):t===n||e?Math.ceil(n/i.indentSize):1+Math.floor(n/i.indentSize)}}class Ut{constructor(){this.activeClassName="indent-active"}getInlineClassName(e,t,n){return this.getInlineClassNameOfLevel(n?t:e)}getInlineClassNameOfLevel(e){return"bracket-indent-guide lvl-"+e%30}}class Kt{constructor(){this.spacesDiff=0,this.looksLikeAlignment=!1}}function jt(e,t,n,i,r){let s;for(r.spacesDiff=0,r.looksLikeAlignment=!1,s=0;s<t&&s<i&&e.charCodeAt(s)===n.charCodeAt(s);s++);let o=0,a=0;for(let n=s;n<t;n++)32===e.charCodeAt(n)?o++:a++;let l=0,h=0;for(let e=s;e<i;e++)32===n.charCodeAt(e)?l++:h++;if(o>0&&a>0)return;if(l>0&&h>0)return;const u=Math.abs(a-h),c=Math.abs(o-l);if(0===u)return r.spacesDiff=c,void(c>0&&0<=l-1&&l-1<e.length&&l<n.length&&32!==n.charCodeAt(l)&&32===e.charCodeAt(l-1)&&44===e.charCodeAt(e.length-1)&&(r.looksLikeAlignment=!0));c%u!=0||(r.spacesDiff=c/u)}function $t(e,t,n){const i=Math.min(e.getLineCount(),1e4);let r=0,s=0,o="",a=0;const l=[2,4,6,8,3,5,7],h=[0,0,0,0,0,0,0,0,0],u=new Kt;for(let l=1;l<=i;l++){const i=e.getLineLength(l),c=e.getLineContent(l),d=i<=65536;let g=!1,f=0,m=0,p=0;for(let t=0,n=i;t<n;t++){const n=d?c.charCodeAt(t):e.getLineCharCode(l,t);if(9===n)p++;else{if(32!==n){g=!0,f=t;break}m++}}if(!g)continue;if(p>0?r++:m>1&&s++,jt(o,a,c,f,u),u.looksLikeAlignment&&(!n||t!==u.spacesDiff))continue;const _=u.spacesDiff;_<=8&&h[_]++,o=c,a=f}let c=n;r!==s&&(c=r<s);let d=t;if(c){let e=c?0:.1*i;l.forEach((t=>{const n=h[t];n>e&&(e=n,d=t)})),4===d&&h[4]>0&&h[2]>0&&h[2]>=h[4]/2&&(d=2)}return{insertSpaces:c,tabSize:d}}function Gt(e){return(1&e.metadata)>>>0}function Qt(e,t){e.metadata=254&e.metadata|t}function Yt(e){return(2&e.metadata)>>>1==1}function Xt(e,t){e.metadata=253&e.metadata|(t?1:0)<<1}function Zt(e){return(4&e.metadata)>>>2==1}function Jt(e,t){e.metadata=251&e.metadata|(t?1:0)<<2}function en(e){return(64&e.metadata)>>>6==1}function tn(e,t){e.metadata=191&e.metadata|(t?1:0)<<6}function nn(e,t){e.metadata=231&e.metadata|t<<3}function rn(e,t){e.metadata=223&e.metadata|(t?1:0)<<5}class sn{constructor(e,t,n){this.metadata=0,this.parent=this,this.left=this,this.right=this,Qt(this,1),this.start=t,this.end=n,this.delta=0,this.maxEnd=n,this.id=e,this.ownerId=0,this.options=null,Jt(this,!1),tn(this,!1),nn(this,1),rn(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=n,this.range=null,Xt(this,!1)}reset(e,t,n,i){this.start=t,this.end=n,this.maxEnd=n,this.cachedVersionId=e,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=n,this.range=i}setOptions(e){this.options=e;const t=this.options.className;Jt(this,"squiggly-error"===t||"squiggly-warning"===t||"squiggly-info"===t),tn(this,null!==this.options.glyphMarginClassName),nn(this,this.options.stickiness),rn(this,this.options.collapseOnReplaceEdit)}setCachedOffsets(e,t,n){this.cachedVersionId!==n&&(this.range=null),this.cachedVersionId=n,this.cachedAbsoluteStart=e,this.cachedAbsoluteEnd=t}detach(){this.parent=null,this.left=null,this.right=null}}const on=new sn(null,0,0);on.parent=on,on.left=on,on.right=on,Qt(on,0);class an{constructor(){this.root=on,this.requestNormalizeDelta=!1}intervalSearch(e,t,n,i,r,s){return this.root===on?[]:function(e,t,n,i,r,s,o){let a=e.root,l=0,h=0,u=0,c=0;const d=[];let g=0;for(;a!==on;)if(Yt(a))Xt(a.left,!1),Xt(a.right,!1),a===a.parent.right&&(l-=a.parent.delta),a=a.parent;else{if(!Yt(a.left)){if(h=l+a.maxEnd,h<t){Xt(a,!0);continue}if(a.left!==on){a=a.left;continue}}if(u=l+a.start,u>n)Xt(a,!0);else{if(c=l+a.end,c>=t){a.setCachedOffsets(u,c,s);let e=!0;i&&a.ownerId&&a.ownerId!==i&&(e=!1),r&&Zt(a)&&(e=!1),o&&!en(a)&&(e=!1),e&&(d[g++]=a)}Xt(a,!0),a.right===on||Yt(a.right)||(l+=a.delta,a=a.right)}}return Xt(e.root,!1),d}(this,e,t,n,i,r,s)}search(e,t,n,i){return this.root===on?[]:function(e,t,n,i,r){let s=e.root,o=0,a=0,l=0;const h=[];let u=0;for(;s!==on;){if(Yt(s)){Xt(s.left,!1),Xt(s.right,!1),s===s.parent.right&&(o-=s.parent.delta),s=s.parent;continue}if(s.left!==on&&!Yt(s.left)){s=s.left;continue}a=o+s.start,l=o+s.end,s.setCachedOffsets(a,l,i);let e=!0;t&&s.ownerId&&s.ownerId!==t&&(e=!1),n&&Zt(s)&&(e=!1),r&&!en(s)&&(e=!1),e&&(h[u++]=s),Xt(s,!0),s.right===on||Yt(s.right)||(o+=s.delta,s=s.right)}return Xt(e.root,!1),h}(this,e,t,n,i)}collectNodesFromOwner(e){return function(e,t){let n=e.root;const i=[];let r=0;for(;n!==on;)Yt(n)?(Xt(n.left,!1),Xt(n.right,!1),n=n.parent):n.left===on||Yt(n.left)?(n.ownerId===t&&(i[r++]=n),Xt(n,!0),n.right===on||Yt(n.right)||(n=n.right)):n=n.left;return Xt(e.root,!1),i}(this,e)}collectNodesPostOrder(){return function(e){let t=e.root;const n=[];let i=0;for(;t!==on;)Yt(t)?(Xt(t.left,!1),Xt(t.right,!1),t=t.parent):t.left===on||Yt(t.left)?t.right===on||Yt(t.right)?(n[i++]=t,Xt(t,!0)):t=t.right:t=t.left;return Xt(e.root,!1),n}(this)}insert(e){un(this,e),this._normalizeDeltaIfNecessary()}delete(e){cn(this,e),this._normalizeDeltaIfNecessary()}resolveNode(e,t){const n=e;let i=0;for(;e!==this.root;)e===e.parent.right&&(i+=e.parent.delta),e=e.parent;const r=n.start+i,s=n.end+i;n.setCachedOffsets(r,s,t)}acceptReplace(e,t,n,i){const r=function(e,t,n){let i=e.root,r=0,s=0,o=0,a=0;const l=[];let h=0;for(;i!==on;)if(Yt(i))Xt(i.left,!1),Xt(i.right,!1),i===i.parent.right&&(r-=i.parent.delta),i=i.parent;else{if(!Yt(i.left)){if(s=r+i.maxEnd,s<t){Xt(i,!0);continue}if(i.left!==on){i=i.left;continue}}o=r+i.start,o>n?Xt(i,!0):(a=r+i.end,a>=t&&(i.setCachedOffsets(o,a,0),l[h++]=i),Xt(i,!0),i.right===on||Yt(i.right)||(r+=i.delta,i=i.right))}return Xt(e.root,!1),l}(this,e,e+t);for(let e=0,t=r.length;e<t;e++)cn(this,r[e]);this._normalizeDeltaIfNecessary(),function(e,t,n,i){let r=e.root,s=0,o=0,a=0;const l=i-(n-t);for(;r!==on;)if(Yt(r))Xt(r.left,!1),Xt(r.right,!1),r===r.parent.right&&(s-=r.parent.delta),pn(r),r=r.parent;else{if(!Yt(r.left)){if(o=s+r.maxEnd,o<t){Xt(r,!0);continue}if(r.left!==on){r=r.left;continue}}a=s+r.start,a>n?(r.start+=l,r.end+=l,r.delta+=l,(r.delta<-1073741824||r.delta>1073741824)&&(e.requestNormalizeDelta=!0),Xt(r,!0)):(Xt(r,!0),r.right===on||Yt(r.right)||(s+=r.delta,r=r.right))}Xt(e.root,!1)}(this,e,e+t,n),this._normalizeDeltaIfNecessary();for(let s=0,o=r.length;s<o;s++){const o=r[s];o.start=o.cachedAbsoluteStart,o.end=o.cachedAbsoluteEnd,hn(o,e,e+t,n,i),o.maxEnd=o.end,un(this,o)}this._normalizeDeltaIfNecessary()}_normalizeDeltaIfNecessary(){this.requestNormalizeDelta&&(this.requestNormalizeDelta=!1,function(e){let t=e.root,n=0;for(;t!==on;)t.left===on||Yt(t.left)?t.right===on||Yt(t.right)?(t.start=n+t.start,t.end=n+t.end,t.delta=0,pn(t),Xt(t,!0),Xt(t.left,!1),Xt(t.right,!1),t===t.parent.right&&(n-=t.parent.delta),t=t.parent):(n+=t.delta,t=t.right):t=t.left;Xt(e.root,!1)}(this))}}function ln(e,t,n,i){return e<n||!(e>n)&&1!==i&&(2===i||t)}function hn(e,t,n,i,r){const s=function(e){return(24&e.metadata)>>>3}(e),o=0===s||2===s,a=1===s||2===s,l=n-t,h=i,u=Math.min(l,h),c=e.start;let d=!1;const g=e.end;let f=!1;t<=c&&g<=n&&function(e){return(32&e.metadata)>>>5==1}(e)&&(e.start=t,d=!0,e.end=t,f=!0);{const e=r?1:l>0?2:0;!d&&ln(c,o,t,e)&&(d=!0),!f&&ln(g,a,t,e)&&(f=!0)}if(u>0&&!r){const e=l>h?2:0;!d&&ln(c,o,t+u,e)&&(d=!0),!f&&ln(g,a,t+u,e)&&(f=!0)}{const i=r?1:0;!d&&ln(c,o,n,i)&&(e.start=t+h,d=!0),!f&&ln(g,a,n,i)&&(e.end=t+h,f=!0)}const m=h-l;d||(e.start=Math.max(0,c+m)),f||(e.end=Math.max(0,g+m)),e.start>e.end&&(e.end=e.start)}function un(e,t){if(e.root===on)return t.parent=on,t.left=on,t.right=on,Qt(t,0),e.root=t,e.root;!function(e,t){let n=0,i=e.root;const r=t.start,s=t.end;for(;;)if(o=r,a=s,l=i.start+n,h=i.end+n,(o===l?a-h:o-l)<0){if(i.left===on){t.start-=n,t.end-=n,t.maxEnd-=n,i.left=t;break}i=i.left}else{if(i.right===on){t.start-=n+i.delta,t.end-=n+i.delta,t.maxEnd-=n+i.delta,i.right=t;break}n+=i.delta,i=i.right}var o,a,l,h;t.parent=i,t.left=on,t.right=on,Qt(t,1)}(e,t),_n(t.parent);let n=t;for(;n!==e.root&&1===Gt(n.parent);)if(n.parent===n.parent.parent.left){const t=n.parent.parent.right;1===Gt(t)?(Qt(n.parent,0),Qt(t,0),Qt(n.parent.parent,1),n=n.parent.parent):(n===n.parent.right&&(n=n.parent,gn(e,n)),Qt(n.parent,0),Qt(n.parent.parent,1),fn(e,n.parent.parent))}else{const t=n.parent.parent.left;1===Gt(t)?(Qt(n.parent,0),Qt(t,0),Qt(n.parent.parent,1),n=n.parent.parent):(n===n.parent.left&&(n=n.parent,fn(e,n)),Qt(n.parent,0),Qt(n.parent.parent,1),gn(e,n.parent.parent))}return Qt(e.root,0),t}function cn(e,t){let n,i;if(t.left===on?(n=t.right,i=t,n.delta+=t.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0),n.start+=t.delta,n.end+=t.delta):t.right===on?(n=t.left,i=t):(i=function(e){for(;e.left!==on;)e=e.left;return e}(t.right),n=i.right,n.start+=i.delta,n.end+=i.delta,n.delta+=i.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0),i.start+=t.delta,i.end+=t.delta,i.delta=t.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0)),i===e.root)return e.root=n,Qt(n,0),t.detach(),dn(),pn(n),void(e.root.parent=on);const r=1===Gt(i);if(i===i.parent.left?i.parent.left=n:i.parent.right=n,i===t?n.parent=i.parent:(i.parent===t?n.parent=i:n.parent=i.parent,i.left=t.left,i.right=t.right,i.parent=t.parent,Qt(i,Gt(t)),t===e.root?e.root=i:t===t.parent.left?t.parent.left=i:t.parent.right=i,i.left!==on&&(i.left.parent=i),i.right!==on&&(i.right.parent=i)),t.detach(),r)return _n(n.parent),i!==t&&(_n(i),_n(i.parent)),void dn();let s;for(_n(n),_n(n.parent),i!==t&&(_n(i),_n(i.parent));n!==e.root&&0===Gt(n);)n===n.parent.left?(s=n.parent.right,1===Gt(s)&&(Qt(s,0),Qt(n.parent,1),gn(e,n.parent),s=n.parent.right),0===Gt(s.left)&&0===Gt(s.right)?(Qt(s,1),n=n.parent):(0===Gt(s.right)&&(Qt(s.left,0),Qt(s,1),fn(e,s),s=n.parent.right),Qt(s,Gt(n.parent)),Qt(n.parent,0),Qt(s.right,0),gn(e,n.parent),n=e.root)):(s=n.parent.left,1===Gt(s)&&(Qt(s,0),Qt(n.parent,1),fn(e,n.parent),s=n.parent.left),0===Gt(s.left)&&0===Gt(s.right)?(Qt(s,1),n=n.parent):(0===Gt(s.left)&&(Qt(s.right,0),Qt(s,1),gn(e,s),s=n.parent.left),Qt(s,Gt(n.parent)),Qt(n.parent,0),Qt(s.left,0),fn(e,n.parent),n=e.root));Qt(n,0),dn()}function dn(){on.parent=on,on.delta=0,on.start=0,on.end=0}function gn(e,t){const n=t.right;n.delta+=t.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0),n.start+=t.delta,n.end+=t.delta,t.right=n.left,n.left!==on&&(n.left.parent=t),n.parent=t.parent,t.parent===on?e.root=n:t===t.parent.left?t.parent.left=n:t.parent.right=n,n.left=t,t.parent=n,pn(t),pn(n)}function fn(e,t){const n=t.left;t.delta-=n.delta,(t.delta<-1073741824||t.delta>1073741824)&&(e.requestNormalizeDelta=!0),t.start-=n.delta,t.end-=n.delta,t.left=n.right,n.right!==on&&(n.right.parent=t),n.parent=t.parent,t.parent===on?e.root=n:t===t.parent.right?t.parent.right=n:t.parent.left=n,n.right=t,t.parent=n,pn(t),pn(n)}function mn(e){let t=e.end;if(e.left!==on){const n=e.left.maxEnd;n>t&&(t=n)}if(e.right!==on){const n=e.right.maxEnd+e.delta;n>t&&(t=n)}return t}function pn(e){e.maxEnd=mn(e)}function _n(e){for(;e!==on;){const t=mn(e);if(e.maxEnd===t)return;e.maxEnd=t,e=e.parent}}class bn{constructor(e,t){this.piece=e,this.color=t,this.size_left=0,this.lf_left=0,this.parent=this,this.left=this,this.right=this}next(){if(this.right!==kn)return Cn(this.right);let e=this;for(;e.parent!==kn&&e.parent.left!==e;)e=e.parent;return e.parent===kn?kn:e.parent}prev(){if(this.left!==kn)return vn(this.left);let e=this;for(;e.parent!==kn&&e.parent.right!==e;)e=e.parent;return e.parent===kn?kn:e.parent}detach(){this.parent=null,this.left=null,this.right=null}}const kn=new bn(null,0);function Cn(e){for(;e.left!==kn;)e=e.left;return e}function vn(e){for(;e.right!==kn;)e=e.right;return e}function Ln(e){return e===kn?0:e.size_left+e.piece.length+Ln(e.right)}function wn(e){return e===kn?0:e.lf_left+e.piece.lineFeedCnt+wn(e.right)}function yn(){kn.parent=kn}function Sn(e,t){const n=t.right;n.size_left+=t.size_left+(t.piece?t.piece.length:0),n.lf_left+=t.lf_left+(t.piece?t.piece.lineFeedCnt:0),t.right=n.left,n.left!==kn&&(n.left.parent=t),n.parent=t.parent,t.parent===kn?e.root=n:t.parent.left===t?t.parent.left=n:t.parent.right=n,n.left=t,t.parent=n}function xn(e,t){const n=t.left;t.left=n.right,n.right!==kn&&(n.right.parent=t),n.parent=t.parent,t.size_left-=n.size_left+(n.piece?n.piece.length:0),t.lf_left-=n.lf_left+(n.piece?n.piece.lineFeedCnt:0),t.parent===kn?e.root=n:t===t.parent.right?t.parent.right=n:t.parent.left=n,n.right=t,t.parent=n}function En(e,t){let n,i;if(t.left===kn?(i=t,n=i.right):t.right===kn?(i=t,n=i.left):(i=Cn(t.right),n=i.right),i===e.root)return e.root=n,n.color=0,t.detach(),yn(),void(e.root.parent=kn);const r=1===i.color;if(i===i.parent.left?i.parent.left=n:i.parent.right=n,i===t?(n.parent=i.parent,Tn(e,n)):(i.parent===t?n.parent=i:n.parent=i.parent,Tn(e,n),i.left=t.left,i.right=t.right,i.parent=t.parent,i.color=t.color,t===e.root?e.root=i:t===t.parent.left?t.parent.left=i:t.parent.right=i,i.left!==kn&&(i.left.parent=i),i.right!==kn&&(i.right.parent=i),i.size_left=t.size_left,i.lf_left=t.lf_left,Tn(e,i)),t.detach(),n.parent.left===n){const t=Ln(n),i=wn(n);if(t!==n.parent.size_left||i!==n.parent.lf_left){const r=t-n.parent.size_left,s=i-n.parent.lf_left;n.parent.size_left=t,n.parent.lf_left=i,In(e,n.parent,r,s)}}if(Tn(e,n.parent),r)return void yn();let s;for(;n!==e.root&&0===n.color;)n===n.parent.left?(s=n.parent.right,1===s.color&&(s.color=0,n.parent.color=1,Sn(e,n.parent),s=n.parent.right),0===s.left.color&&0===s.right.color?(s.color=1,n=n.parent):(0===s.right.color&&(s.left.color=0,s.color=1,xn(e,s),s=n.parent.right),s.color=n.parent.color,n.parent.color=0,s.right.color=0,Sn(e,n.parent),n=e.root)):(s=n.parent.left,1===s.color&&(s.color=0,n.parent.color=1,xn(e,n.parent),s=n.parent.left),0===s.left.color&&0===s.right.color?(s.color=1,n=n.parent):(0===s.left.color&&(s.right.color=0,s.color=1,Sn(e,s),s=n.parent.left),s.color=n.parent.color,n.parent.color=0,s.left.color=0,xn(e,n.parent),n=e.root));n.color=0,yn()}function Nn(e,t){for(Tn(e,t);t!==e.root&&1===t.parent.color;)if(t.parent===t.parent.parent.left){const n=t.parent.parent.right;1===n.color?(t.parent.color=0,n.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.right&&Sn(e,t=t.parent),t.parent.color=0,t.parent.parent.color=1,xn(e,t.parent.parent))}else{const n=t.parent.parent.left;1===n.color?(t.parent.color=0,n.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.left&&xn(e,t=t.parent),t.parent.color=0,t.parent.parent.color=1,Sn(e,t.parent.parent))}e.root.color=0}function In(e,t,n,i){for(;t!==e.root&&t!==kn;)t.parent.left===t&&(t.parent.size_left+=n,t.parent.lf_left+=i),t=t.parent}function Tn(e,t){let n=0,i=0;if(t!==e.root){for(;t!==e.root&&t===t.parent.right;)t=t.parent;if(t!==e.root)for(n=Ln((t=t.parent).left)-t.size_left,i=wn(t.left)-t.lf_left,t.size_left+=n,t.lf_left+=i;t!==e.root&&(0!==n||0!==i);)t.parent.left===t&&(t.parent.size_left+=n,t.parent.lf_left+=i),t=t.parent}}kn.parent=kn,kn.left=kn,kn.right=kn,kn.color=0;var An=n(2007);const Rn=65535;function Mn(e){let t;return t=e[e.length-1]<65536?new Uint16Array(e.length):new Uint32Array(e.length),t.set(e,0),t}class Dn{constructor(e,t,n,i,r){this.lineStarts=e,this.cr=t,this.lf=n,this.crlf=i,this.isBasicASCII=r}}function On(e,t=!0){const n=[0];let i=1;for(let t=0,r=e.length;t<r;t++){const s=e.charCodeAt(t);13===s?t+1<r&&10===e.charCodeAt(t+1)?(n[i++]=t+2,t++):n[i++]=t+1:10===s&&(n[i++]=t+1)}return t?Mn(n):n}class Bn{constructor(e,t,n,i,r){this.bufferIndex=e,this.start=t,this.end=n,this.lineFeedCnt=i,this.length=r}}class Fn{constructor(e,t){this.buffer=e,this.lineStarts=t}}class Pn{constructor(e,t){this._pieces=[],this._tree=e,this._BOM=t,this._index=0,e.root!==kn&&e.iterate(e.root,(e=>(e!==kn&&this._pieces.push(e.piece),!0)))}read(){return 0===this._pieces.length?0===this._index?(this._index++,this._BOM):null:this._index>this._pieces.length-1?null:0===this._index?this._BOM+this._tree.getPieceContent(this._pieces[this._index++]):this._tree.getPieceContent(this._pieces[this._index++])}}class zn{constructor(e){this._limit=e,this._cache=[]}get(e){for(let t=this._cache.length-1;t>=0;t--){const n=this._cache[t];if(n.nodeStartOffset<=e&&n.nodeStartOffset+n.node.piece.length>=e)return n}return null}get2(e){for(let t=this._cache.length-1;t>=0;t--){const n=this._cache[t];if(n.nodeStartLineNumber&&n.nodeStartLineNumber<e&&n.nodeStartLineNumber+n.node.piece.lineFeedCnt>=e)return n}return null}set(e){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(e)}validate(e){let t=!1;const n=this._cache;for(let i=0;i<n.length;i++){const r=n[i];(null===r.node.parent||r.nodeStartOffset>=e)&&(n[i]=null,t=!0)}if(t){const e=[];for(const t of n)null!==t&&e.push(t);this._cache=e}}}class Vn{constructor(e,t,n){this.create(e,t,n)}create(e,t,n){this._buffers=[new Fn("",[0])],this._lastChangeBufferPos={line:0,column:0},this.root=kn,this._lineCnt=1,this._length=0,this._EOL=t,this._EOLLength=t.length,this._EOLNormalized=n;let i=null;for(let t=0,n=e.length;t<n;t++)if(e[t].buffer.length>0){e[t].lineStarts||(e[t].lineStarts=On(e[t].buffer));const n=new Bn(t+1,{line:0,column:0},{line:e[t].lineStarts.length-1,column:e[t].buffer.length-e[t].lineStarts[e[t].lineStarts.length-1]},e[t].lineStarts.length-1,e[t].buffer.length);this._buffers.push(e[t]),i=this.rbInsertRight(i,n)}this._searchCache=new zn(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()}normalizeEOL(e){const t=65535-Math.floor(21845),n=2*t;let i="",r=0;const s=[];if(this.iterate(this.root,(o=>{const a=this.getNodeContent(o),l=a.length;if(r<=t||r+l<n)return i+=a,r+=l,!0;const h=i.replace(/\r\n|\r|\n/g,e);return s.push(new Fn(h,On(h))),i=a,r=l,!0})),r>0){const t=i.replace(/\r\n|\r|\n/g,e);s.push(new Fn(t,On(t)))}this.create(s,e,!0)}getEOL(){return this._EOL}setEOL(e){this._EOL=e,this._EOLLength=this._EOL.length,this.normalizeEOL(e)}createSnapshot(e){return new Pn(this,e)}getOffsetAt(e,t){let n=0,i=this.root;for(;i!==kn;)if(i.left!==kn&&i.lf_left+1>=e)i=i.left;else{if(i.lf_left+i.piece.lineFeedCnt+1>=e)return n+=i.size_left,n+(this.getAccumulatedValue(i,e-i.lf_left-2)+t-1);e-=i.lf_left+i.piece.lineFeedCnt,n+=i.size_left+i.piece.length,i=i.right}return n}getPositionAt(e){e=Math.floor(e),e=Math.max(0,e);let t=this.root,n=0;const i=e;for(;t!==kn;)if(0!==t.size_left&&t.size_left>=e)t=t.left;else{if(t.size_left+t.piece.length>=e){const r=this.getIndexOf(t,e-t.size_left);if(n+=t.lf_left+r.index,0===r.index){const e=i-this.getOffsetAt(n+1,1);return new g.y(n+1,e+1)}return new g.y(n+1,r.remainder+1)}if(e-=t.size_left+t.piece.length,n+=t.lf_left+t.piece.lineFeedCnt,t.right===kn){const t=i-e-this.getOffsetAt(n+1,1);return new g.y(n+1,t+1)}t=t.right}return new g.y(1,1)}getValueInRange(e,t){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return"";const n=this.nodeAt2(e.startLineNumber,e.startColumn),i=this.nodeAt2(e.endLineNumber,e.endColumn),r=this.getValueInRange2(n,i);return t?t===this._EOL&&this._EOLNormalized&&t===this.getEOL()&&this._EOLNormalized?r:r.replace(/\r\n|\r|\n/g,t):r}getValueInRange2(e,t){if(e.node===t.node){const n=e.node,i=this._buffers[n.piece.bufferIndex].buffer,r=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return i.substring(r+e.remainder,r+t.remainder)}let n=e.node;const i=this._buffers[n.piece.bufferIndex].buffer,r=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);let s=i.substring(r+e.remainder,r+n.piece.length);for(n=n.next();n!==kn;){const e=this._buffers[n.piece.bufferIndex].buffer,i=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);if(n===t.node){s+=e.substring(i,i+t.remainder);break}s+=e.substr(i,n.piece.length),n=n.next()}return s}getLinesContent(){const e=[];let t=0,n="",i=!1;return this.iterate(this.root,(r=>{if(r===kn)return!0;const s=r.piece;let o=s.length;if(0===o)return!0;const a=this._buffers[s.bufferIndex].buffer,l=this._buffers[s.bufferIndex].lineStarts,h=s.start.line,u=s.end.line;let c=l[h]+s.start.column;if(i&&(10===a.charCodeAt(c)&&(c++,o--),e[t++]=n,n="",i=!1,0===o))return!0;if(h===u)return this._EOLNormalized||13!==a.charCodeAt(c+o-1)?n+=a.substr(c,o):(i=!0,n+=a.substr(c,o-1)),!0;n+=this._EOLNormalized?a.substring(c,Math.max(c,l[h+1]-this._EOLLength)):a.substring(c,l[h+1]).replace(/(\r\n|\r|\n)$/,""),e[t++]=n;for(let i=h+1;i<u;i++)n=this._EOLNormalized?a.substring(l[i],l[i+1]-this._EOLLength):a.substring(l[i],l[i+1]).replace(/(\r\n|\r|\n)$/,""),e[t++]=n;return this._EOLNormalized||13!==a.charCodeAt(l[u]+s.end.column-1)?n=a.substr(l[u],s.end.column):(i=!0,0===s.end.column?t--:n=a.substr(l[u],s.end.column-1)),!0})),i&&(e[t++]=n,n=""),e[t++]=n,e}getLength(){return this._length}getLineCount(){return this._lineCnt}getLineContent(e){return this._lastVisitedLine.lineNumber===e||(this._lastVisitedLine.lineNumber=e,e===this._lineCnt?this._lastVisitedLine.value=this.getLineRawContent(e):this._EOLNormalized?this._lastVisitedLine.value=this.getLineRawContent(e,this._EOLLength):this._lastVisitedLine.value=this.getLineRawContent(e).replace(/(\r\n|\r|\n)$/,"")),this._lastVisitedLine.value}_getCharCode(e){if(e.remainder===e.node.piece.length){const t=e.node.next();if(!t)return 0;const n=this._buffers[t.piece.bufferIndex],i=this.offsetInBuffer(t.piece.bufferIndex,t.piece.start);return n.buffer.charCodeAt(i)}{const t=this._buffers[e.node.piece.bufferIndex],n=this.offsetInBuffer(e.node.piece.bufferIndex,e.node.piece.start)+e.remainder;return t.buffer.charCodeAt(n)}}getLineCharCode(e,t){const n=this.nodeAt2(e,t+1);return this._getCharCode(n)}getLineLength(e){if(e===this.getLineCount()){const t=this.getOffsetAt(e,1);return this.getLength()-t}return this.getOffsetAt(e+1,1)-this.getOffsetAt(e,1)-this._EOLLength}findMatchesInNode(e,t,n,i,r,s,o,a,l,h,u){const c=this._buffers[e.piece.bufferIndex],d=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start),g=this.offsetInBuffer(e.piece.bufferIndex,r),m=this.offsetInBuffer(e.piece.bufferIndex,s);let p;const _={line:0,column:0};let b,k;t._wordSeparators?(b=c.buffer.substring(g,m),k=e=>e+g,t.reset(0)):(b=c.buffer,k=e=>e,t.reset(g));do{if(p=t.next(b),p){if(k(p.index)>=m)return h;this.positionInBuffer(e,k(p.index)-d,_);const t=this.getLineFeedCnt(e.piece.bufferIndex,r,_),s=_.line===r.line?_.column-r.column+i:_.column+1,o=s+p[0].length;if(u[h++]=(0,An.dr)(new f.Q(n+t,s,n+t,o),p,a),k(p.index)+p[0].length>=m)return h;if(h>=l)return h}}while(p);return h}findMatchesLineByLine(e,t,n,i){const r=[];let s=0;const o=new An.W5(t.wordSeparators,t.regex);let a=this.nodeAt2(e.startLineNumber,e.startColumn);if(null===a)return[];const l=this.nodeAt2(e.endLineNumber,e.endColumn);if(null===l)return[];let h=this.positionInBuffer(a.node,a.remainder);const u=this.positionInBuffer(l.node,l.remainder);if(a.node===l.node)return this.findMatchesInNode(a.node,o,e.startLineNumber,e.startColumn,h,u,t,n,i,s,r),r;let c=e.startLineNumber,d=a.node;for(;d!==l.node;){const l=this.getLineFeedCnt(d.piece.bufferIndex,h,d.piece.end);if(l>=1){const a=this._buffers[d.piece.bufferIndex].lineStarts,u=this.offsetInBuffer(d.piece.bufferIndex,d.piece.start),g=a[h.line+l],f=c===e.startLineNumber?e.startColumn:1;if(s=this.findMatchesInNode(d,o,c,f,h,this.positionInBuffer(d,g-u),t,n,i,s,r),s>=i)return r;c+=l}const u=c===e.startLineNumber?e.startColumn-1:0;if(c===e.endLineNumber){const a=this.getLineContent(c).substring(u,e.endColumn-1);return s=this._findMatchesInLine(t,o,a,e.endLineNumber,u,s,r,n,i),r}if(s=this._findMatchesInLine(t,o,this.getLineContent(c).substr(u),c,u,s,r,n,i),s>=i)return r;c++,a=this.nodeAt2(c,1),d=a.node,h=this.positionInBuffer(a.node,a.remainder)}if(c===e.endLineNumber){const a=c===e.startLineNumber?e.startColumn-1:0,l=this.getLineContent(c).substring(a,e.endColumn-1);return s=this._findMatchesInLine(t,o,l,e.endLineNumber,a,s,r,n,i),r}const g=c===e.startLineNumber?e.startColumn:1;return s=this.findMatchesInNode(l.node,o,c,g,h,u,t,n,i,s,r),r}_findMatchesInLine(e,t,n,i,r,s,o,a,l){const h=e.wordSeparators;if(!a&&e.simpleSearch){const t=e.simpleSearch,a=t.length,u=n.length;let c=-a;for(;-1!==(c=n.indexOf(t,c+a));)if((!h||(0,An.wC)(h,n,u,c,a))&&(o[s++]=new ce.Dg(new f.Q(i,c+1+r,i,c+1+a+r),null),s>=l))return s;return s}let u;t.reset(0);do{if(u=t.next(n),u&&(o[s++]=(0,An.dr)(new f.Q(i,u.index+1+r,i,u.index+1+u[0].length+r),u,a),s>=l))return s}while(u);return s}insert(e,t,n=!1){if(this._EOLNormalized=this._EOLNormalized&&n,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==kn){const{node:n,remainder:i,nodeStartOffset:r}=this.nodeAt(e),s=n.piece,o=s.bufferIndex,a=this.positionInBuffer(n,i);if(0===n.piece.bufferIndex&&s.end.line===this._lastChangeBufferPos.line&&s.end.column===this._lastChangeBufferPos.column&&r+s.length===e&&t.length<Rn)return this.appendToNode(n,t),void this.computeBufferMetadata();if(r===e)this.insertContentToNodeLeft(t,n),this._searchCache.validate(e);else if(r+n.piece.length>e){const e=[];let r=new Bn(s.bufferIndex,a,s.end,this.getLineFeedCnt(s.bufferIndex,a,s.end),this.offsetInBuffer(o,s.end)-this.offsetInBuffer(o,a));if(this.shouldCheckCRLF()&&this.endWithCR(t)&&10===this.nodeCharCodeAt(n,i)){const e={line:r.start.line+1,column:0};r=new Bn(r.bufferIndex,e,r.end,this.getLineFeedCnt(r.bufferIndex,e,r.end),r.length-1),t+="\n"}if(this.shouldCheckCRLF()&&this.startWithLF(t))if(13===this.nodeCharCodeAt(n,i-1)){const r=this.positionInBuffer(n,i-1);this.deleteNodeTail(n,r),t="\r"+t,0===n.piece.length&&e.push(n)}else this.deleteNodeTail(n,a);else this.deleteNodeTail(n,a);const l=this.createNewPieces(t);r.length>0&&this.rbInsertRight(n,r);let h=n;for(let e=0;e<l.length;e++)h=this.rbInsertRight(h,l[e]);this.deleteNodes(e)}else this.insertContentToNodeRight(t,n)}else{const e=this.createNewPieces(t);let n=this.rbInsertLeft(null,e[0]);for(let t=1;t<e.length;t++)n=this.rbInsertRight(n,e[t])}this.computeBufferMetadata()}delete(e,t){if(this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",t<=0||this.root===kn)return;const n=this.nodeAt(e),i=this.nodeAt(e+t),r=n.node,s=i.node;if(r===s){const s=this.positionInBuffer(r,n.remainder),o=this.positionInBuffer(r,i.remainder);if(n.nodeStartOffset===e){if(t===r.piece.length){const e=r.next();return En(this,r),this.validateCRLFWithPrevNode(e),void this.computeBufferMetadata()}return this.deleteNodeHead(r,o),this._searchCache.validate(e),this.validateCRLFWithPrevNode(r),void this.computeBufferMetadata()}return n.nodeStartOffset+r.piece.length===e+t?(this.deleteNodeTail(r,s),this.validateCRLFWithNextNode(r),void this.computeBufferMetadata()):(this.shrinkNode(r,s,o),void this.computeBufferMetadata())}const o=[],a=this.positionInBuffer(r,n.remainder);this.deleteNodeTail(r,a),this._searchCache.validate(e),0===r.piece.length&&o.push(r);const l=this.positionInBuffer(s,i.remainder);this.deleteNodeHead(s,l),0===s.piece.length&&o.push(s);for(let e=r.next();e!==kn&&e!==s;e=e.next())o.push(e);const h=0===r.piece.length?r.prev():r;this.deleteNodes(o),this.validateCRLFWithNextNode(h),this.computeBufferMetadata()}insertContentToNodeLeft(e,t){const n=[];if(this.shouldCheckCRLF()&&this.endWithCR(e)&&this.startWithLF(t)){const i=t.piece,r={line:i.start.line+1,column:0},s=new Bn(i.bufferIndex,r,i.end,this.getLineFeedCnt(i.bufferIndex,r,i.end),i.length-1);t.piece=s,e+="\n",In(this,t,-1,-1),0===t.piece.length&&n.push(t)}const i=this.createNewPieces(e);let r=this.rbInsertLeft(t,i[i.length-1]);for(let e=i.length-2;e>=0;e--)r=this.rbInsertLeft(r,i[e]);this.validateCRLFWithPrevNode(r),this.deleteNodes(n)}insertContentToNodeRight(e,t){this.adjustCarriageReturnFromNext(e,t)&&(e+="\n");const n=this.createNewPieces(e),i=this.rbInsertRight(t,n[0]);let r=i;for(let e=1;e<n.length;e++)r=this.rbInsertRight(r,n[e]);this.validateCRLFWithPrevNode(i)}positionInBuffer(e,t,n){const i=e.piece,r=e.piece.bufferIndex,s=this._buffers[r].lineStarts,o=s[i.start.line]+i.start.column+t;let a=i.start.line,l=i.end.line,h=0,u=0,c=0;for(;a<=l&&(h=a+(l-a)/2|0,c=s[h],h!==l);)if(u=s[h+1],o<c)l=h-1;else{if(!(o>=u))break;a=h+1}return n?(n.line=h,n.column=o-c,null):{line:h,column:o-c}}getLineFeedCnt(e,t,n){if(0===n.column)return n.line-t.line;const i=this._buffers[e].lineStarts;if(n.line===i.length-1)return n.line-t.line;const r=i[n.line+1],s=i[n.line]+n.column;if(r>s+1)return n.line-t.line;const o=s-1;return 13===this._buffers[e].buffer.charCodeAt(o)?n.line-t.line+1:n.line-t.line}offsetInBuffer(e,t){return this._buffers[e].lineStarts[t.line]+t.column}deleteNodes(e){for(let t=0;t<e.length;t++)En(this,e[t])}createNewPieces(e){if(e.length>Rn){const t=[];for(;e.length>Rn;){const n=e.charCodeAt(65534);let i;13===n||n>=55296&&n<=56319?(i=e.substring(0,65534),e=e.substring(65534)):(i=e.substring(0,Rn),e=e.substring(Rn));const r=On(i);t.push(new Bn(this._buffers.length,{line:0,column:0},{line:r.length-1,column:i.length-r[r.length-1]},r.length-1,i.length)),this._buffers.push(new Fn(i,r))}const n=On(e);return t.push(new Bn(this._buffers.length,{line:0,column:0},{line:n.length-1,column:e.length-n[n.length-1]},n.length-1,e.length)),this._buffers.push(new Fn(e,n)),t}let t=this._buffers[0].buffer.length;const n=On(e,!1);let i=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===t&&0!==t&&this.startWithLF(e)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1},i=this._lastChangeBufferPos;for(let e=0;e<n.length;e++)n[e]+=t+1;this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(n.slice(1)),this._buffers[0].buffer+="_"+e,t+=1}else{if(0!==t)for(let e=0;e<n.length;e++)n[e]+=t;this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(n.slice(1)),this._buffers[0].buffer+=e}const r=this._buffers[0].buffer.length,s=this._buffers[0].lineStarts.length-1,o={line:s,column:r-this._buffers[0].lineStarts[s]},a=new Bn(0,i,o,this.getLineFeedCnt(0,i,o),r-t);return this._lastChangeBufferPos=o,[a]}getLineRawContent(e,t=0){let n=this.root,i="";const r=this._searchCache.get2(e);if(r){n=r.node;const s=this.getAccumulatedValue(n,e-r.nodeStartLineNumber-1),o=this._buffers[n.piece.bufferIndex].buffer,a=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);if(r.nodeStartLineNumber+n.piece.lineFeedCnt!==e){const i=this.getAccumulatedValue(n,e-r.nodeStartLineNumber);return o.substring(a+s,a+i-t)}i=o.substring(a+s,a+n.piece.length)}else{let r=0;const s=e;for(;n!==kn;)if(n.left!==kn&&n.lf_left>=e-1)n=n.left;else{if(n.lf_left+n.piece.lineFeedCnt>e-1){const i=this.getAccumulatedValue(n,e-n.lf_left-2),o=this.getAccumulatedValue(n,e-n.lf_left-1),a=this._buffers[n.piece.bufferIndex].buffer,l=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return r+=n.size_left,this._searchCache.set({node:n,nodeStartOffset:r,nodeStartLineNumber:s-(e-1-n.lf_left)}),a.substring(l+i,l+o-t)}if(n.lf_left+n.piece.lineFeedCnt===e-1){const t=this.getAccumulatedValue(n,e-n.lf_left-2),r=this._buffers[n.piece.bufferIndex].buffer,s=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);i=r.substring(s+t,s+n.piece.length);break}e-=n.lf_left+n.piece.lineFeedCnt,r+=n.size_left+n.piece.length,n=n.right}}for(n=n.next();n!==kn;){const e=this._buffers[n.piece.bufferIndex].buffer;if(n.piece.lineFeedCnt>0){const r=this.getAccumulatedValue(n,0),s=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return i+=e.substring(s,s+r-t),i}{const t=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);i+=e.substr(t,n.piece.length)}n=n.next()}return i}computeBufferMetadata(){let e=this.root,t=1,n=0;for(;e!==kn;)t+=e.lf_left+e.piece.lineFeedCnt,n+=e.size_left+e.piece.length,e=e.right;this._lineCnt=t,this._length=n,this._searchCache.validate(this._length)}getIndexOf(e,t){const n=e.piece,i=this.positionInBuffer(e,t),r=i.line-n.start.line;if(this.offsetInBuffer(n.bufferIndex,n.end)-this.offsetInBuffer(n.bufferIndex,n.start)===t){const t=this.getLineFeedCnt(e.piece.bufferIndex,n.start,i);if(t!==r)return{index:t,remainder:0}}return{index:r,remainder:i.column}}getAccumulatedValue(e,t){if(t<0)return 0;const n=e.piece,i=this._buffers[n.bufferIndex].lineStarts,r=n.start.line+t+1;return r>n.end.line?i[n.end.line]+n.end.column-i[n.start.line]-n.start.column:i[r]-i[n.start.line]-n.start.column}deleteNodeTail(e,t){const n=e.piece,i=n.lineFeedCnt,r=this.offsetInBuffer(n.bufferIndex,n.end),s=t,o=this.offsetInBuffer(n.bufferIndex,s),a=this.getLineFeedCnt(n.bufferIndex,n.start,s),l=a-i,h=o-r,u=n.length+h;e.piece=new Bn(n.bufferIndex,n.start,s,a,u),In(this,e,h,l)}deleteNodeHead(e,t){const n=e.piece,i=n.lineFeedCnt,r=this.offsetInBuffer(n.bufferIndex,n.start),s=t,o=this.getLineFeedCnt(n.bufferIndex,s,n.end),a=o-i,l=r-this.offsetInBuffer(n.bufferIndex,s),h=n.length+l;e.piece=new Bn(n.bufferIndex,s,n.end,o,h),In(this,e,l,a)}shrinkNode(e,t,n){const i=e.piece,r=i.start,s=i.end,o=i.length,a=i.lineFeedCnt,l=t,h=this.getLineFeedCnt(i.bufferIndex,i.start,l),u=this.offsetInBuffer(i.bufferIndex,t)-this.offsetInBuffer(i.bufferIndex,r);e.piece=new Bn(i.bufferIndex,i.start,l,h,u),In(this,e,u-o,h-a);const c=new Bn(i.bufferIndex,n,s,this.getLineFeedCnt(i.bufferIndex,n,s),this.offsetInBuffer(i.bufferIndex,s)-this.offsetInBuffer(i.bufferIndex,n)),d=this.rbInsertRight(e,c);this.validateCRLFWithPrevNode(d)}appendToNode(e,t){this.adjustCarriageReturnFromNext(t,e)&&(t+="\n");const n=this.shouldCheckCRLF()&&this.startWithLF(t)&&this.endWithCR(e),i=this._buffers[0].buffer.length;this._buffers[0].buffer+=t;const r=On(t,!1);for(let e=0;e<r.length;e++)r[e]+=i;if(n){const e=this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-2];this._buffers[0].lineStarts.pop(),this._lastChangeBufferPos={line:this._lastChangeBufferPos.line-1,column:i-e}}this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(r.slice(1));const s=this._buffers[0].lineStarts.length-1,o={line:s,column:this._buffers[0].buffer.length-this._buffers[0].lineStarts[s]},a=e.piece.length+t.length,l=e.piece.lineFeedCnt,h=this.getLineFeedCnt(0,e.piece.start,o),u=h-l;e.piece=new Bn(e.piece.bufferIndex,e.piece.start,o,h,a),this._lastChangeBufferPos=o,In(this,e,t.length,u)}nodeAt(e){let t=this.root;const n=this._searchCache.get(e);if(n)return{node:n.node,nodeStartOffset:n.nodeStartOffset,remainder:e-n.nodeStartOffset};let i=0;for(;t!==kn;)if(t.size_left>e)t=t.left;else{if(t.size_left+t.piece.length>=e){i+=t.size_left;const n={node:t,remainder:e-t.size_left,nodeStartOffset:i};return this._searchCache.set(n),n}e-=t.size_left+t.piece.length,i+=t.size_left+t.piece.length,t=t.right}return null}nodeAt2(e,t){let n=this.root,i=0;for(;n!==kn;)if(n.left!==kn&&n.lf_left>=e-1)n=n.left;else{if(n.lf_left+n.piece.lineFeedCnt>e-1){const r=this.getAccumulatedValue(n,e-n.lf_left-2),s=this.getAccumulatedValue(n,e-n.lf_left-1);return i+=n.size_left,{node:n,remainder:Math.min(r+t-1,s),nodeStartOffset:i}}if(n.lf_left+n.piece.lineFeedCnt===e-1){const r=this.getAccumulatedValue(n,e-n.lf_left-2);if(r+t-1<=n.piece.length)return{node:n,remainder:r+t-1,nodeStartOffset:i};t-=n.piece.length-r;break}e-=n.lf_left+n.piece.lineFeedCnt,i+=n.size_left+n.piece.length,n=n.right}for(n=n.next();n!==kn;){if(n.piece.lineFeedCnt>0){const e=this.getAccumulatedValue(n,0),i=this.offsetOfNode(n);return{node:n,remainder:Math.min(t-1,e),nodeStartOffset:i}}if(n.piece.length>=t-1)return{node:n,remainder:t-1,nodeStartOffset:this.offsetOfNode(n)};t-=n.piece.length,n=n.next()}return null}nodeCharCodeAt(e,t){if(e.piece.lineFeedCnt<1)return-1;const n=this._buffers[e.piece.bufferIndex],i=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start)+t;return n.buffer.charCodeAt(i)}offsetOfNode(e){if(!e)return 0;let t=e.size_left;for(;e!==this.root;)e.parent.right===e&&(t+=e.parent.size_left+e.parent.piece.length),e=e.parent;return t}shouldCheckCRLF(){return!(this._EOLNormalized&&"\n"===this._EOL)}startWithLF(e){if("string"==typeof e)return 10===e.charCodeAt(0);if(e===kn||0===e.piece.lineFeedCnt)return!1;const t=e.piece,n=this._buffers[t.bufferIndex].lineStarts,i=t.start.line,r=n[i]+t.start.column;return i!==n.length-1&&(!(n[i+1]>r+1)&&10===this._buffers[t.bufferIndex].buffer.charCodeAt(r))}endWithCR(e){return"string"==typeof e?13===e.charCodeAt(e.length-1):e!==kn&&0!==e.piece.lineFeedCnt&&13===this.nodeCharCodeAt(e,e.piece.length-1)}validateCRLFWithPrevNode(e){if(this.shouldCheckCRLF()&&this.startWithLF(e)){const t=e.prev();this.endWithCR(t)&&this.fixCRLF(t,e)}}validateCRLFWithNextNode(e){if(this.shouldCheckCRLF()&&this.endWithCR(e)){const t=e.next();this.startWithLF(t)&&this.fixCRLF(e,t)}}fixCRLF(e,t){const n=[],i=this._buffers[e.piece.bufferIndex].lineStarts;let r;r=0===e.piece.end.column?{line:e.piece.end.line-1,column:i[e.piece.end.line]-i[e.piece.end.line-1]-1}:{line:e.piece.end.line,column:e.piece.end.column-1};const s=e.piece.length-1,o=e.piece.lineFeedCnt-1;e.piece=new Bn(e.piece.bufferIndex,e.piece.start,r,o,s),In(this,e,-1,-1),0===e.piece.length&&n.push(e);const a={line:t.piece.start.line+1,column:0},l=t.piece.length-1,h=this.getLineFeedCnt(t.piece.bufferIndex,a,t.piece.end);t.piece=new Bn(t.piece.bufferIndex,a,t.piece.end,h,l),In(this,t,-1,-1),0===t.piece.length&&n.push(t);const u=this.createNewPieces("\r\n");this.rbInsertRight(e,u[0]);for(let e=0;e<n.length;e++)En(this,n[e])}adjustCarriageReturnFromNext(e,t){if(this.shouldCheckCRLF()&&this.endWithCR(e)){const n=t.next();if(this.startWithLF(n)){if(e+="\n",1===n.piece.length)En(this,n);else{const e=n.piece,t={line:e.start.line+1,column:0},i=e.length-1,r=this.getLineFeedCnt(e.bufferIndex,t,e.end);n.piece=new Bn(e.bufferIndex,t,e.end,r,i),In(this,n,-1,-1)}return!0}}return!1}iterate(e,t){if(e===kn)return t(kn);const n=this.iterate(e.left,t);return n?t(e)&&this.iterate(e.right,t):n}getNodeContent(e){if(e===kn)return"";const t=this._buffers[e.piece.bufferIndex],n=e.piece,i=this.offsetInBuffer(n.bufferIndex,n.start),r=this.offsetInBuffer(n.bufferIndex,n.end);return t.buffer.substring(i,r)}getPieceContent(e){const t=this._buffers[e.bufferIndex],n=this.offsetInBuffer(e.bufferIndex,e.start),i=this.offsetInBuffer(e.bufferIndex,e.end);return t.buffer.substring(n,i)}rbInsertRight(e,t){const n=new bn(t,1);if(n.left=kn,n.right=kn,n.parent=kn,n.size_left=0,n.lf_left=0,this.root===kn)this.root=n,n.color=0;else if(e.right===kn)e.right=n,n.parent=e;else{const t=Cn(e.right);t.left=n,n.parent=t}return Nn(this,n),n}rbInsertLeft(e,t){const n=new bn(t,1);if(n.left=kn,n.right=kn,n.parent=kn,n.size_left=0,n.lf_left=0,this.root===kn)this.root=n,n.color=0;else if(e.left===kn)e.left=n,n.parent=e;else{const t=vn(e.left);t.right=n,n.parent=t}return Nn(this,n),n}}class qn extends r.jG{constructor(e,t,n,r,s,o,a){super(),this._onDidChangeContent=this._register(new i.vl),this._BOM=t,this._mightContainNonBasicASCII=!o,this._mightContainRTL=r,this._mightContainUnusualLineTerminators=s,this._pieceTree=new Vn(e,n,a)}mightContainRTL(){return this._mightContainRTL}mightContainUnusualLineTerminators(){return this._mightContainUnusualLineTerminators}resetMightContainUnusualLineTerminators(){this._mightContainUnusualLineTerminators=!1}mightContainNonBasicASCII(){return this._mightContainNonBasicASCII}getBOM(){return this._BOM}getEOL(){return this._pieceTree.getEOL()}createSnapshot(e){return this._pieceTree.createSnapshot(e?this._BOM:"")}getOffsetAt(e,t){return this._pieceTree.getOffsetAt(e,t)}getPositionAt(e){return this._pieceTree.getPositionAt(e)}getRangeAt(e,t){const n=e+t,i=this.getPositionAt(e),r=this.getPositionAt(n);return new f.Q(i.lineNumber,i.column,r.lineNumber,r.column)}getValueInRange(e,t=0){if(e.isEmpty())return"";const n=this._getEndOfLine(t);return this._pieceTree.getValueInRange(e,n)}getValueLengthInRange(e,t=0){if(e.isEmpty())return 0;if(e.startLineNumber===e.endLineNumber)return e.endColumn-e.startColumn;const n=this.getOffsetAt(e.startLineNumber,e.startColumn),i=this.getOffsetAt(e.endLineNumber,e.endColumn);let r=0;const s=this._getEndOfLine(t),o=this.getEOL();return s.length!==o.length&&(r=(s.length-o.length)*(e.endLineNumber-e.startLineNumber)),i-n+r}getCharacterCountInRange(e,t=0){if(this._mightContainNonBasicASCII){let n=0;const i=e.startLineNumber,r=e.endLineNumber;for(let t=i;t<=r;t++){const s=this.getLineContent(t),o=t===i?e.startColumn-1:0,a=t===r?e.endColumn-1:s.length;for(let e=o;e<a;e++)h.pc(s.charCodeAt(e))?(n+=1,e+=1):n+=1}return n+=this._getEndOfLine(t).length*(r-i),n}return this.getValueLengthInRange(e,t)}getLength(){return this._pieceTree.getLength()}getLineCount(){return this._pieceTree.getLineCount()}getLinesContent(){return this._pieceTree.getLinesContent()}getLineContent(e){return this._pieceTree.getLineContent(e)}getLineCharCode(e,t){return this._pieceTree.getLineCharCode(e,t)}getLineLength(e){return this._pieceTree.getLineLength(e)}getLineFirstNonWhitespaceColumn(e){const t=h.HG(this.getLineContent(e));return-1===t?0:t+1}getLineLastNonWhitespaceColumn(e){const t=h.lT(this.getLineContent(e));return-1===t?0:t+2}_getEndOfLine(e){switch(e){case 1:return"\n";case 2:return"\r\n";case 0:return this.getEOL();default:throw new Error("Unknown EOL preference")}}setEOL(e){this._pieceTree.setEOL(e)}applyEdits(e,t,n){let i=this._mightContainRTL,r=this._mightContainUnusualLineTerminators,s=this._mightContainNonBasicASCII,o=!0,a=[];for(let t=0;t<e.length;t++){const n=e[t];o&&n._isTracked&&(o=!1);const l=n.range;if(n.text){let e=!0;s||(e=!h.aC(n.text),s=e),!i&&e&&(i=h.E_(n.text)),!r&&e&&(r=h.$X(n.text))}let u="",d=0,g=0,f=0;if(n.text){let e;[d,g,f,e]=(0,c.W)(n.text);const t=this.getEOL();u=0===e||e===("\r\n"===t?2:1)?n.text:n.text.replace(/\r\n|\r|\n/g,t)}a[t]={sortIndex:t,identifier:n.identifier||null,range:l,rangeOffset:this.getOffsetAt(l.startLineNumber,l.startColumn),rangeLength:this.getValueLengthInRange(l),text:u,eolCount:d,firstLineLength:g,lastLineLength:f,forceMoveMarkers:Boolean(n.forceMoveMarkers),isAutoWhitespaceEdit:n.isAutoWhitespaceEdit||!1}}a.sort(qn._sortOpsAscending);let l=!1;for(let e=0,t=a.length-1;e<t;e++){const t=a[e].range.getEndPosition(),n=a[e+1].range.getStartPosition();if(n.isBeforeOrEqual(t)){if(n.isBefore(t))throw new Error("Overlapping ranges are not allowed!");l=!0}}o&&(a=this._reduceOperations(a));const u=n||t?qn._getInverseEditRanges(a):[],d=[];if(t)for(let e=0;e<a.length;e++){const t=a[e],n=u[e];if(t.isAutoWhitespaceEdit&&t.range.isEmpty())for(let e=n.startLineNumber;e<=n.endLineNumber;e++){let i="";e===n.startLineNumber&&(i=this.getLineContent(t.range.startLineNumber),-1!==h.HG(i))||d.push({lineNumber:e,oldContent:i})}}let g=null;if(n){let e=0;g=[];for(let t=0;t<a.length;t++){const n=a[t],i=u[t],r=this.getValueInRange(n.range),s=n.rangeOffset+e;e+=n.text.length-r.length,g[t]={sortIndex:n.sortIndex,identifier:n.identifier,range:i,text:r,textChange:new Nt(n.rangeOffset,r,s,n.text)}}l||g.sort(((e,t)=>e.sortIndex-t.sortIndex))}this._mightContainRTL=i,this._mightContainUnusualLineTerminators=r,this._mightContainNonBasicASCII=s;const f=this._doApplyEdits(a);let m=null;if(t&&d.length>0){d.sort(((e,t)=>t.lineNumber-e.lineNumber)),m=[];for(let e=0,t=d.length;e<t;e++){const t=d[e].lineNumber;if(e>0&&d[e-1].lineNumber===t)continue;const n=d[e].oldContent,i=this.getLineContent(t);0!==i.length&&i!==n&&-1===h.HG(i)&&m.push(t)}}return this._onDidChangeContent.fire(),new ce.F4(g,f,m)}_reduceOperations(e){return e.length<1e3?e:[this._toSingleEditOperation(e)]}_toSingleEditOperation(e){let t=!1;const n=e[0].range,i=e[e.length-1].range,r=new f.Q(n.startLineNumber,n.startColumn,i.endLineNumber,i.endColumn);let s=n.startLineNumber,o=n.startColumn;const a=[];for(let n=0,i=e.length;n<i;n++){const i=e[n],r=i.range;t=t||i.forceMoveMarkers,a.push(this.getValueInRange(new f.Q(s,o,r.startLineNumber,r.startColumn))),i.text.length>0&&a.push(i.text),s=r.endLineNumber,o=r.endColumn}const l=a.join(""),[h,u,d]=(0,c.W)(l);return{sortIndex:0,identifier:e[0].identifier,range:r,rangeOffset:this.getOffsetAt(r.startLineNumber,r.startColumn),rangeLength:this.getValueLengthInRange(r,0),text:l,eolCount:h,firstLineLength:u,lastLineLength:d,forceMoveMarkers:t,isAutoWhitespaceEdit:!1}}_doApplyEdits(e){e.sort(qn._sortOpsDescending);const t=[];for(let n=0;n<e.length;n++){const i=e[n],r=i.range.startLineNumber,s=i.range.startColumn,o=i.range.endLineNumber,a=i.range.endColumn;if(r===o&&s===a&&0===i.text.length)continue;i.text?(this._pieceTree.delete(i.rangeOffset,i.rangeLength),this._pieceTree.insert(i.rangeOffset,i.text,!0)):this._pieceTree.delete(i.rangeOffset,i.rangeLength);const l=new f.Q(r,s,o,a);t.push({range:l,rangeLength:i.rangeLength,text:i.text,rangeOffset:i.rangeOffset,forceMoveMarkers:i.forceMoveMarkers})}return t}findMatchesLineByLine(e,t,n,i){return this._pieceTree.findMatchesLineByLine(e,t,n,i)}static _getInverseEditRanges(e){const t=[];let n=0,i=0,r=null;for(let s=0,o=e.length;s<o;s++){const o=e[s];let a,l,h;if(r?r.range.endLineNumber===o.range.startLineNumber?(a=n,l=i+(o.range.startColumn-r.range.endColumn)):(a=n+(o.range.startLineNumber-r.range.endLineNumber),l=o.range.startColumn):(a=o.range.startLineNumber,l=o.range.startColumn),o.text.length>0){const e=o.eolCount+1;h=1===e?new f.Q(a,l,a,l+o.firstLineLength):new f.Q(a,l,a+e-1,o.lastLineLength+1)}else h=new f.Q(a,l,a,l);n=h.endLineNumber,i=h.endColumn,t.push(h),r=o}return t}static _sortOpsAscending(e,t){const n=f.Q.compareRangesUsingEnds(e.range,t.range);return 0===n?e.sortIndex-t.sortIndex:n}static _sortOpsDescending(e,t){const n=f.Q.compareRangesUsingEnds(e.range,t.range);return 0===n?t.sortIndex-e.sortIndex:-n}}class Wn{constructor(e,t,n,i,r,s,o,a,l){this._chunks=e,this._bom=t,this._cr=n,this._lf=i,this._crlf=r,this._containsRTL=s,this._containsUnusualLineTerminators=o,this._isBasicASCII=a,this._normalizeEOL=l}_getEOL(e){const t=this._cr+this._lf+this._crlf,n=this._cr+this._crlf;return 0===t?1===e?"\n":"\r\n":n>t/2?"\r\n":"\n"}create(e){const t=this._getEOL(e),n=this._chunks;if(this._normalizeEOL&&("\r\n"===t&&(this._cr>0||this._lf>0)||"\n"===t&&(this._cr>0||this._crlf>0)))for(let e=0,i=n.length;e<i;e++){const i=n[e].buffer.replace(/\r\n|\r|\n/g,t),r=On(i);n[e]=new Fn(i,r)}const i=new qn(n,this._bom,t,this._containsRTL,this._containsUnusualLineTerminators,this._isBasicASCII,this._normalizeEOL);return{textBuffer:i,disposable:i}}}class Hn{constructor(){this.chunks=[],this.BOM="",this._hasPreviousChar=!1,this._previousChar=0,this._tmpLineStarts=[],this.cr=0,this.lf=0,this.crlf=0,this.containsRTL=!1,this.containsUnusualLineTerminators=!1,this.isBasicASCII=!0}acceptChunk(e){if(0===e.length)return;0===this.chunks.length&&h.LU(e)&&(this.BOM=h.r_,e=e.substr(1));const t=e.charCodeAt(e.length-1);13===t||t>=55296&&t<=56319?(this._acceptChunk1(e.substr(0,e.length-1),!1),this._hasPreviousChar=!0,this._previousChar=t):(this._acceptChunk1(e,!1),this._hasPreviousChar=!1,this._previousChar=t)}_acceptChunk1(e,t){(t||0!==e.length)&&(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+e):this._acceptChunk2(e))}_acceptChunk2(e){const t=function(e,t){e.length=0,e[0]=0;let n=1,i=0,r=0,s=0,o=!0;for(let a=0,l=t.length;a<l;a++){const h=t.charCodeAt(a);13===h?a+1<l&&10===t.charCodeAt(a+1)?(s++,e[n++]=a+2,a++):(i++,e[n++]=a+1):10===h?(r++,e[n++]=a+1):o&&9!==h&&(h<32||h>126)&&(o=!1)}const a=new Dn(Mn(e),i,r,s,o);return e.length=0,a}(this._tmpLineStarts,e);this.chunks.push(new Fn(e,t.lineStarts)),this.cr+=t.cr,this.lf+=t.lf,this.crlf+=t.crlf,t.isBasicASCII||(this.isBasicASCII=!1,this.containsRTL||(this.containsRTL=h.E_(e)),this.containsUnusualLineTerminators||(this.containsUnusualLineTerminators=h.$X(e)))}finish(e=!0){return this._finish(),new Wn(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.containsUnusualLineTerminators,this.isBasicASCII,e)}_finish(){if(0===this.chunks.length&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;const e=this.chunks[this.chunks.length-1];e.buffer+=String.fromCharCode(this._previousChar);const t=On(e.buffer);e.lineStarts=t,13===this._previousChar&&this.cr++}}}var Un=n(9955),Kn=n(4364),jn=n(1946),$n=n(3013),Gn=n(2532);const Qn=new class{clone(){return this}equals(e){return this===e}};class Yn{constructor(e){this._default=e,this._store=[]}get(e){return e<this._store.length?this._store[e]:this._default}set(e,t){for(;e>=this._store.length;)this._store[this._store.length]=this._default;this._store[e]=t}replace(e,t,n){if(e>=this._store.length)return;if(0===t)return void this.insert(e,n);if(0===n)return void this.delete(e,t);const i=this._store.slice(0,e),r=this._store.slice(e+t),s=function(e,t){const n=[];for(let i=0;i<e;i++)n[i]=t;return n}(n,this._default);this._store=i.concat(s,r)}delete(e,t){0===t||e>=this._store.length||this._store.splice(e,t)}insert(e,t){if(0===t||e>=this._store.length)return;const n=[];for(let e=0;e<t;e++)n[e]=this._default;this._store=(0,o.nK)(this._store,e,n)}}class Xn{get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._startLineNumber+this._tokens.length-1}constructor(e,t){this._startLineNumber=e,this._tokens=t}getLineTokens(e){return this._tokens[e-this._startLineNumber]}appendLineTokens(e){this._tokens.push(e)}}class Zn{constructor(){this._tokens=[]}add(e,t){if(this._tokens.length>0){const n=this._tokens[this._tokens.length-1];if(n.endLineNumber+1===e)return void n.appendLineTokens(t)}this._tokens.push(new Xn(e,[t]))}finalize(){return this._tokens}}class Jn{static{this.defaultTokenMetadata=33587200}static createEmpty(e,t){const n=Jn.defaultTokenMetadata,i=new Uint32Array(2);return i[0]=e.length,i[1]=n,new Jn(i,e,t)}static createFromTextAndMetadata(e,t){let n=0,i="";const r=new Array;for(const{text:t,metadata:s}of e)r.push(n+t.length,s),n+=t.length,i+=t;return new Jn(new Uint32Array(r),i,t)}constructor(e,t,n){this._lineTokensBrand=void 0,this._tokens=e,this._tokensCount=this._tokens.length>>>1,this._text=t,this.languageIdCodec=n}equals(e){return e instanceof Jn&&this.slicedEquals(e,0,this._tokensCount)}slicedEquals(e,t,n){if(this._text!==e._text)return!1;if(this._tokensCount!==e._tokensCount)return!1;const i=t<<1,r=i+(n<<1);for(let t=i;t<r;t++)if(this._tokens[t]!==e._tokens[t])return!1;return!0}getLineContent(){return this._text}getCount(){return this._tokensCount}getStartOffset(e){return e>0?this._tokens[e-1<<1]:0}getMetadata(e){return this._tokens[1+(e<<1)]}getLanguageId(e){const t=this._tokens[1+(e<<1)],n=Ge.x.getLanguageId(t);return this.languageIdCodec.decodeLanguageId(n)}getStandardTokenType(e){const t=this._tokens[1+(e<<1)];return Ge.x.getTokenType(t)}getForeground(e){const t=this._tokens[1+(e<<1)];return Ge.x.getForeground(t)}getClassName(e){const t=this._tokens[1+(e<<1)];return Ge.x.getClassNameFromMetadata(t)}getInlineStyle(e,t){const n=this._tokens[1+(e<<1)];return Ge.x.getInlineStyleFromMetadata(n,t)}getPresentation(e){const t=this._tokens[1+(e<<1)];return Ge.x.getPresentationFromMetadata(t)}getEndOffset(e){return this._tokens[e<<1]}findTokenIndexAtOffset(e){return Jn.findIndexInTokensArray(this._tokens,e)}inflate(){return this}sliceAndInflate(e,t,n){return new ei(this,e,t,n)}static convertToEndOffset(e,t){const n=(e.length>>>1)-1;for(let t=0;t<n;t++)e[t<<1]=e[t+1<<1];e[n<<1]=t}static findIndexInTokensArray(e,t){if(e.length<=2)return 0;let n=0,i=(e.length>>>1)-1;for(;n<i;){const r=n+Math.floor((i-n)/2),s=e[r<<1];if(s===t)return r+1;s<t?n=r+1:s>t&&(i=r)}return n}withInserted(e){if(0===e.length)return this;let t=0,n=0,i="";const r=new Array;let s=0;for(;;){const o=t<this._tokensCount?this._tokens[t<<1]:-1,a=n<e.length?e[n]:null;if(-1!==o&&(null===a||o<=a.offset)){i+=this._text.substring(s,o);const e=this._tokens[1+(t<<1)];r.push(i.length,e),t++,s=o}else{if(!a)break;if(a.offset>s){i+=this._text.substring(s,a.offset);const e=this._tokens[1+(t<<1)];r.push(i.length,e),s=a.offset}i+=a.text,r.push(i.length,a.tokenMetadata),n++}}return new Jn(new Uint32Array(r),i,this.languageIdCodec)}getTokenText(e){const t=this.getStartOffset(e),n=this.getEndOffset(e);return this._text.substring(t,n)}forEach(e){const t=this.getCount();for(let n=0;n<t;n++)e(n)}}class ei{constructor(e,t,n,i){this._source=e,this._startOffset=t,this._endOffset=n,this._deltaOffset=i,this._firstTokenIndex=e.findTokenIndexAtOffset(t),this.languageIdCodec=e.languageIdCodec,this._tokensCount=0;for(let t=this._firstTokenIndex,i=e.getCount();t<i&&!(e.getStartOffset(t)>=n);t++)this._tokensCount++}getMetadata(e){return this._source.getMetadata(this._firstTokenIndex+e)}getLanguageId(e){return this._source.getLanguageId(this._firstTokenIndex+e)}getLineContent(){return this._source.getLineContent().substring(this._startOffset,this._endOffset)}equals(e){return e instanceof ei&&this._startOffset===e._startOffset&&this._endOffset===e._endOffset&&this._deltaOffset===e._deltaOffset&&this._source.slicedEquals(e._source,this._firstTokenIndex,this._tokensCount)}getCount(){return this._tokensCount}getStandardTokenType(e){return this._source.getStandardTokenType(this._firstTokenIndex+e)}getForeground(e){return this._source.getForeground(this._firstTokenIndex+e)}getEndOffset(e){const t=this._source.getEndOffset(this._firstTokenIndex+e);return Math.min(this._endOffset,t)-this._startOffset+this._deltaOffset}getClassName(e){return this._source.getClassName(this._firstTokenIndex+e)}getInlineStyle(e,t){return this._source.getInlineStyle(this._firstTokenIndex+e,t)}getPresentation(e){return this._source.getPresentation(this._firstTokenIndex+e)}findTokenIndexAtOffset(e){return this._source.findTokenIndexAtOffset(e+this._startOffset-this._deltaOffset)-this._firstTokenIndex}getTokenText(e){const t=this._firstTokenIndex+e,n=this._source.getStartOffset(t),i=this._source.getEndOffset(t);let r=this._source.getTokenText(t);return n<this._startOffset&&(r=r.substring(this._startOffset-n)),i>this._endOffset&&(r=r.substring(0,r.length-(i-this._endOffset))),r}forEach(e){for(let t=0;t<this.getCount();t++)e(t)}}class ti{constructor(e,t){this.tokenizationSupport=t,this.initialState=this.tokenizationSupport.getInitialState(),this.store=new ii(e)}getStartState(e){return this.store.getStartState(e,this.initialState)}getFirstInvalidLine(){return this.store.getFirstInvalidLine(this.initialState)}}class ni extends ti{constructor(e,t,n,i){super(e,t),this._textModel=n,this._languageIdCodec=i}updateTokensUntilLine(e,t){const n=this._textModel.getLanguageId();for(;;){const i=this.getFirstInvalidLine();if(!i||i.lineNumber>t)break;const r=this._textModel.getLineContent(i.lineNumber),s=oi(this._languageIdCodec,n,this.tokenizationSupport,r,!0,i.startState);e.add(i.lineNumber,s.tokens),this.store.setEndState(i.lineNumber,s.endState)}}getTokenTypeIfInsertingCharacter(e,t){const n=this.getStartState(e.lineNumber);if(!n)return 0;const i=this._textModel.getLanguageId(),r=this._textModel.getLineContent(e.lineNumber),s=r.substring(0,e.column-1)+t+r.substring(e.column-1),o=oi(this._languageIdCodec,i,this.tokenizationSupport,s,!0,n),a=new Jn(o.tokens,s,this._languageIdCodec);if(0===a.getCount())return 0;const l=a.findTokenIndexAtOffset(e.column-1);return a.getStandardTokenType(l)}tokenizeLineWithEdit(e,t,n){const i=e.lineNumber,r=e.column,s=this.getStartState(i);if(!s)return null;const o=this._textModel.getLineContent(i),a=o.substring(0,r-1)+n+o.substring(r-1+t),l=this._textModel.getLanguageIdAtPosition(i,0),h=oi(this._languageIdCodec,l,this.tokenizationSupport,a,!0,s);return new Jn(h.tokens,a,this._languageIdCodec)}hasAccurateTokensForLine(e){return e<this.store.getFirstInvalidEndStateLineNumberOrMax()}isCheapToTokenize(e){const t=this.store.getFirstInvalidEndStateLineNumberOrMax();return e<t||e===t&&this._textModel.getLineLength(e)<2048}tokenizeHeuristically(e,t,n){if(n<=this.store.getFirstInvalidEndStateLineNumberOrMax())return{heuristicTokens:!1};if(t<=this.store.getFirstInvalidEndStateLineNumberOrMax())return this.updateTokensUntilLine(e,n),{heuristicTokens:!1};let i=this.guessStartState(t);const r=this._textModel.getLanguageId();for(let s=t;s<=n;s++){const t=this._textModel.getLineContent(s),n=oi(this._languageIdCodec,r,this.tokenizationSupport,t,!0,i);e.add(s,n.tokens),i=n.endState}return{heuristicTokens:!0}}guessStartState(e){let t=this._textModel.getLineFirstNonWhitespaceColumn(e);const n=[];let i=null;for(let r=e-1;t>1&&r>=1;r--){const e=this._textModel.getLineFirstNonWhitespaceColumn(r);if(0!==e&&e<t&&(n.push(this._textModel.getLineContent(r)),t=e,i=this.getStartState(r),i))break}i||(i=this.tokenizationSupport.getInitialState()),n.reverse();const r=this._textModel.getLanguageId();let s=i;for(const e of n)s=oi(this._languageIdCodec,r,this.tokenizationSupport,e,!1,s).endState;return s}}class ii{constructor(e){this.lineCount=e,this._tokenizationStateStore=new ri,this._invalidEndStatesLineNumbers=new si,this._invalidEndStatesLineNumbers.addRange(new Gn.L(1,e+1))}getEndState(e){return this._tokenizationStateStore.getEndState(e)}setEndState(e,t){if(!t)throw new l.D7("Cannot set null/undefined state");this._invalidEndStatesLineNumbers.delete(e);const n=this._tokenizationStateStore.setEndState(e,t);return n&&e<this.lineCount&&this._invalidEndStatesLineNumbers.addRange(new Gn.L(e+1,e+2)),n}acceptChange(e,t){this.lineCount+=t-e.length,this._tokenizationStateStore.acceptChange(e,t),this._invalidEndStatesLineNumbers.addRangeAndResize(new Gn.L(e.startLineNumber,e.endLineNumberExclusive),t)}acceptChanges(e){for(const t of e){const[e]=(0,c.W)(t.text);this.acceptChange(new Un.M(t.range.startLineNumber,t.range.endLineNumber+1),e+1)}}invalidateEndStateRange(e){this._invalidEndStatesLineNumbers.addRange(new Gn.L(e.startLineNumber,e.endLineNumberExclusive))}getFirstInvalidEndStateLineNumber(){return this._invalidEndStatesLineNumbers.min}getFirstInvalidEndStateLineNumberOrMax(){return this.getFirstInvalidEndStateLineNumber()||Number.MAX_SAFE_INTEGER}allStatesValid(){return null===this._invalidEndStatesLineNumbers.min}getStartState(e,t){return 1===e?t:this.getEndState(e-1)}getFirstInvalidLine(e){const t=this.getFirstInvalidEndStateLineNumber();if(null===t)return null;const n=this.getStartState(t,e);if(!n)throw new l.D7("Start state must be defined");return{lineNumber:t,startState:n}}}class ri{constructor(){this._lineEndStates=new Yn(null)}getEndState(e){return this._lineEndStates.get(e)}setEndState(e,t){const n=this._lineEndStates.get(e);return!(n&&n.equals(t)||(this._lineEndStates.set(e,t),0))}acceptChange(e,t){let n=e.length;t>0&&n>0&&(n--,t--),this._lineEndStates.replace(e.startLineNumber,n,t)}}class si{constructor(){this._ranges=[]}get min(){return 0===this._ranges.length?null:this._ranges[0].start}delete(e){const t=this._ranges.findIndex((t=>t.contains(e)));if(-1!==t){const n=this._ranges[t];n.start===e?n.endExclusive===e+1?this._ranges.splice(t,1):this._ranges[t]=new Gn.L(e+1,n.endExclusive):n.endExclusive===e+1?this._ranges[t]=new Gn.L(n.start,e):this._ranges.splice(t,1,new Gn.L(n.start,e),new Gn.L(e+1,n.endExclusive))}}addRange(e){Gn.L.addRange(e,this._ranges)}addRangeAndResize(e,t){let n=0;for(;!(n>=this._ranges.length||e.start<=this._ranges[n].endExclusive);)n++;let i=n;for(;!(i>=this._ranges.length||e.endExclusive<this._ranges[i].start);)i++;const r=t-e.length;for(let e=i;e<this._ranges.length;e++)this._ranges[e]=this._ranges[e].delta(r);if(n===i){const i=new Gn.L(e.start,e.start+t);i.isEmpty||this._ranges.splice(n,0,i)}else{const t=Math.min(e.start,this._ranges[n].start),s=Math.max(e.endExclusive,this._ranges[i-1].endExclusive),o=new Gn.L(t,s+r);o.isEmpty?this._ranges.splice(n,i-n):this._ranges.splice(n,i-n,o)}}toString(){return this._ranges.map((e=>e.toString())).join(" + ")}}function oi(e,t,n,i,r,s){let o=null;if(n)try{o=n.tokenizeEncoded(i,r,s.clone())}catch(e){(0,l.dz)(e)}return o||(o=function(e,t){const n=new Uint32Array(2);return n[0]=0,n[1]=(32768|e|2<<24)>>>0,new Kn.rY(n,null===t?Qn:t)}(e.encodeLanguageId(t),s)),Jn.convertToEndOffset(o.tokens,i.length),o}class ai{constructor(e,t){this._tokenizerWithStateStore=e,this._backgroundTokenStore=t,this._isDisposed=!1,this._isScheduled=!1}dispose(){this._isDisposed=!0}handleChanges(){this._beginBackgroundTokenization()}_beginBackgroundTokenization(){!this._isScheduled&&this._tokenizerWithStateStore._textModel.isAttachedToEditor()&&this._hasLinesToTokenize()&&(this._isScheduled=!0,(0,jn.$6)((e=>{this._isScheduled=!1,this._backgroundTokenizeWithDeadline(e)})))}_backgroundTokenizeWithDeadline(e){const t=Date.now()+e.timeRemaining(),n=()=>{!this._isDisposed&&this._tokenizerWithStateStore._textModel.isAttachedToEditor()&&this._hasLinesToTokenize()&&(this._backgroundTokenizeForAtLeast1ms(),Date.now()<t?(0,s._p)(n):this._beginBackgroundTokenization())};n()}_backgroundTokenizeForAtLeast1ms(){const e=this._tokenizerWithStateStore._textModel.getLineCount(),t=new Zn,n=$n.W.create(!1);do{if(n.elapsed()>1)break;if(this._tokenizeOneInvalidLine(t)>=e)break}while(this._hasLinesToTokenize());this._backgroundTokenStore.setTokens(t.finalize()),this.checkFinished()}_hasLinesToTokenize(){return!!this._tokenizerWithStateStore&&!this._tokenizerWithStateStore.store.allStatesValid()}_tokenizeOneInvalidLine(e){const t=this._tokenizerWithStateStore?.getFirstInvalidLine();return t?(this._tokenizerWithStateStore.updateTokensUntilLine(e,t.lineNumber),t.lineNumber):this._tokenizerWithStateStore._textModel.getLineCount()+1}checkFinished(){this._isDisposed||this._tokenizerWithStateStore.store.allStatesValid()&&this._backgroundTokenStore.backgroundTokenizationFinished()}requestTokens(e,t){this._tokenizerWithStateStore.store.invalidateEndStateRange(new Un.M(e,t))}}class li{constructor(){this._onDidChangeVisibleRanges=new i.vl,this.onDidChangeVisibleRanges=this._onDidChangeVisibleRanges.event,this._views=new Set}attachView(){const e=new hi((t=>{this._onDidChangeVisibleRanges.fire({view:e,state:t})}));return this._views.add(e),e}detachView(e){this._views.delete(e),this._onDidChangeVisibleRanges.fire({view:e,state:void 0})}}class hi{constructor(e){this.handleStateChange=e}setVisibleLines(e,t){const n=e.map((e=>new Un.M(e.startLineNumber,e.endLineNumber+1)));this.handleStateChange({visibleLineRanges:n,stabilized:t})}}class ui extends r.jG{get lineRanges(){return this._lineRanges}constructor(e){super(),this._refreshTokens=e,this.runner=this._register(new jn.uC((()=>this.update()),50)),this._computedLineRanges=[],this._lineRanges=[]}update(){(0,o.aI)(this._computedLineRanges,this._lineRanges,((e,t)=>e.equals(t)))||(this._computedLineRanges=this._lineRanges,this._refreshTokens())}handleStateChange(e){this._lineRanges=e.visibleLineRanges,e.stabilized?(this.runner.cancel(),this.update()):this.runner.schedule()}}class ci extends r.jG{get backgroundTokenizationState(){return this._backgroundTokenizationState}constructor(e,t,n){super(),this._languageIdCodec=e,this._textModel=t,this.getLanguageId=n,this._backgroundTokenizationState=1,this._onDidChangeBackgroundTokenizationState=this._register(new i.vl),this.onDidChangeBackgroundTokenizationState=this._onDidChangeBackgroundTokenizationState.event,this._onDidChangeTokens=this._register(new i.vl),this.onDidChangeTokens=this._onDidChangeTokens.event}tokenizeIfCheap(e){this.isCheapToTokenize(e)&&this.forceTokenization(e)}}class di extends ci{constructor(e,t,n,i){super(t,n,i),this._treeSitterService=e,this._tokenizationSupport=null,this._initialize()}_initialize(){const e=this.getLanguageId();this._tokenizationSupport&&this._lastLanguageId===e||(this._lastLanguageId=e,this._tokenizationSupport=Kn.OB.get(e))}getLineTokens(e){const t=this._textModel.getLineContent(e);if(this._tokenizationSupport){const n=this._tokenizationSupport.tokenizeEncoded(e,this._textModel);if(n)return new Jn(n,t,this._languageIdCodec)}return Jn.createEmpty(t,this._languageIdCodec)}resetTokenization(e=!0){e&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]}),this._initialize()}handleDidChangeAttached(){}handleDidChangeContent(e){e.isFlush&&this.resetTokenization(!1)}forceTokenization(e){}hasAccurateTokensForLine(e){return!0}isCheapToTokenize(e){return!0}getTokenTypeIfInsertingCharacter(e,t,n){return 0}tokenizeLineWithEdit(e,t,n){return null}get hasTokens(){return void 0!==this._treeSitterService.getParseResult(this._textModel)}}var gi=n(5320);const fi=new Uint32Array(0).buffer;class mi{static deleteBeginning(e,t){return null===e||e===fi?e:mi.delete(e,0,t)}static deleteEnding(e,t){if(null===e||e===fi)return e;const n=pi(e),i=n[n.length-2];return mi.delete(e,t,i)}static delete(e,t,n){if(null===e||e===fi||t===n)return e;const i=pi(e),r=i.length>>>1;if(0===t&&i[i.length-2]===n)return fi;const s=Jn.findIndexInTokensArray(i,t),o=s>0?i[s-1<<1]:0;if(n<i[s<<1]){const o=n-t;for(let e=s;e<r;e++)i[e<<1]-=o;return e}let a,l;o!==t?(i[s<<1]=t,a=s+1<<1,l=t):(a=s<<1,l=o);const h=n-t;for(let e=s+1;e<r;e++){const t=i[e<<1]-h;t>l&&(i[a++]=t,i[a++]=i[1+(e<<1)],l=t)}if(a===i.length)return e;const u=new Uint32Array(a);return u.set(i.subarray(0,a),0),u.buffer}static append(e,t){if(t===fi)return e;if(e===fi)return t;if(null===e)return e;if(null===t)return null;const n=pi(e),i=pi(t),r=i.length>>>1,s=new Uint32Array(n.length+i.length);s.set(n,0);let o=n.length;const a=n[n.length-2];for(let e=0;e<r;e++)s[o++]=i[e<<1]+a,s[o++]=i[1+(e<<1)];return s.buffer}static insert(e,t,n){if(null===e||e===fi)return e;const i=pi(e),r=i.length>>>1;let s=Jn.findIndexInTokensArray(i,t);s>0&&i[s-1<<1]===t&&s--;for(let e=s;e<r;e++)i[e<<1]+=n;return e}}function pi(e){return e instanceof Uint32Array?e:new Uint32Array(e)}class _i{constructor(e){this._lineTokens=[],this._len=0,this._languageIdCodec=e}flush(){this._lineTokens=[],this._len=0}get hasTokens(){return this._lineTokens.length>0}getTokens(e,t,n){let i=null;if(t<this._len&&(i=this._lineTokens[t]),null!==i&&i!==fi)return new Jn(pi(i),n,this._languageIdCodec);const r=new Uint32Array(2);return r[0]=n.length,r[1]=bi(this._languageIdCodec.encodeLanguageId(e)),new Jn(r,n,this._languageIdCodec)}static _massageTokens(e,t,n){const i=n?pi(n):null;if(0===t){let t=!1;if(i&&i.length>1&&(t=Ge.x.getLanguageId(i[1])!==e),!t)return fi}if(!i||0===i.length){const n=new Uint32Array(2);return n[0]=t,n[1]=bi(e),n.buffer}return i[i.length-2]=t,0===i.byteOffset&&i.byteLength===i.buffer.byteLength?i.buffer:i}_ensureLine(e){for(;e>=this._len;)this._lineTokens[this._len]=null,this._len++}_deleteLines(e,t){0!==t&&(e+t>this._len&&(t=this._len-e),this._lineTokens.splice(e,t),this._len-=t)}_insertLines(e,t){if(0===t)return;const n=[];for(let e=0;e<t;e++)n[e]=null;this._lineTokens=o.nK(this._lineTokens,e,n),this._len+=t}setTokens(e,t,n,i,r){const s=_i._massageTokens(this._languageIdCodec.encodeLanguageId(e),n,i);this._ensureLine(t);const o=this._lineTokens[t];return this._lineTokens[t]=s,!!r&&!_i._equals(o,s)}static _equals(e,t){if(!e||!t)return!e&&!t;const n=pi(e),i=pi(t);if(n.length!==i.length)return!1;for(let e=0,t=n.length;e<t;e++)if(n[e]!==i[e])return!1;return!0}acceptEdit(e,t,n){this._acceptDeleteRange(e),this._acceptInsertText(new g.y(e.startLineNumber,e.startColumn),t,n)}_acceptDeleteRange(e){const t=e.startLineNumber-1;if(t>=this._len)return;if(e.startLineNumber===e.endLineNumber){if(e.startColumn===e.endColumn)return;return void(this._lineTokens[t]=mi.delete(this._lineTokens[t],e.startColumn-1,e.endColumn-1))}this._lineTokens[t]=mi.deleteEnding(this._lineTokens[t],e.startColumn-1);const n=e.endLineNumber-1;let i=null;n<this._len&&(i=mi.deleteBeginning(this._lineTokens[n],e.endColumn-1)),this._lineTokens[t]=mi.append(this._lineTokens[t],i),this._deleteLines(e.startLineNumber,e.endLineNumber-e.startLineNumber)}_acceptInsertText(e,t,n){if(0===t&&0===n)return;const i=e.lineNumber-1;i>=this._len||(0!==t?(this._lineTokens[i]=mi.deleteEnding(this._lineTokens[i],e.column-1),this._lineTokens[i]=mi.insert(this._lineTokens[i],e.column-1,n),this._insertLines(e.lineNumber,t)):this._lineTokens[i]=mi.insert(this._lineTokens[i],e.column-1,n))}setMultilineTokens(e,t){if(0===e.length)return{changes:[]};const n=[];for(let i=0,r=e.length;i<r;i++){const r=e[i];let s=0,o=0,a=!1;for(let e=r.startLineNumber;e<=r.endLineNumber;e++)a?(this.setTokens(t.getLanguageId(),e-1,t.getLineLength(e),r.getLineTokens(e),!1),o=e):this.setTokens(t.getLanguageId(),e-1,t.getLineLength(e),r.getLineTokens(e),!0)&&(a=!0,s=e,o=e);a&&n.push({fromLineNumber:s,toLineNumber:o})}return{changes:n}}}function bi(e){return(32768|e|2<<24|1024)>>>0}class ki{constructor(e){this._pieces=[],this._isComplete=!1,this._languageIdCodec=e}flush(){this._pieces=[],this._isComplete=!1}isEmpty(){return 0===this._pieces.length}set(e,t){this._pieces=e||[],this._isComplete=t}setPartial(e,t){let n=e;if(t.length>0){const i=t[0].getRange(),r=t[t.length-1].getRange();if(!i||!r)return e;n=e.plusRange(i).plusRange(r)}let i=null;for(let e=0,t=this._pieces.length;e<t;e++){const r=this._pieces[e];if(r.endLineNumber<n.startLineNumber)continue;if(r.startLineNumber>n.endLineNumber){i=i||{index:e};break}if(r.removeTokens(n),r.isEmpty()){this._pieces.splice(e,1),e--,t--;continue}if(r.endLineNumber<n.startLineNumber)continue;if(r.startLineNumber>n.endLineNumber){i=i||{index:e};continue}const[s,o]=r.split(n);s.isEmpty()?i=i||{index:e}:o.isEmpty()||(this._pieces.splice(e,1,s,o),e++,t++,i=i||{index:e})}return i=i||{index:this._pieces.length},t.length>0&&(this._pieces=o.nK(this._pieces,i.index,t)),n}isComplete(){return this._isComplete}addSparseTokens(e,t){if(0===t.getLineContent().length)return t;const n=this._pieces;if(0===n.length)return t;const i=n[ki._findFirstPieceWithLine(n,e)].getLineTokens(e);if(!i)return t;const r=t.getCount(),s=i.getCount();let o=0;const a=[];let l=0,h=0;const u=(e,t)=>{e!==h&&(h=e,a[l++]=e,a[l++]=t)};for(let e=0;e<s;e++){const n=i.getStartCharacter(e),s=i.getEndCharacter(e),a=i.getMetadata(e),l=((1&a?2048:0)|(2&a?4096:0)|(4&a?8192:0)|(8&a?16384:0)|(16&a?16744448:0)|(32&a?4278190080:0))>>>0,h=~l>>>0;for(;o<r&&t.getEndOffset(o)<=n;)u(t.getEndOffset(o),t.getMetadata(o)),o++;for(o<r&&t.getStartOffset(o)<n&&u(n,t.getMetadata(o));o<r&&t.getEndOffset(o)<s;)u(t.getEndOffset(o),t.getMetadata(o)&h|a&l),o++;if(o<r)u(s,t.getMetadata(o)&h|a&l),t.getEndOffset(o)===s&&o++;else{const e=Math.min(Math.max(0,o-1),r-1);u(s,t.getMetadata(e)&h|a&l)}}for(;o<r;)u(t.getEndOffset(o),t.getMetadata(o)),o++;return new Jn(new Uint32Array(a),t.getLineContent(),this._languageIdCodec)}static _findFirstPieceWithLine(e,t){let n=0,i=e.length-1;for(;n<i;){let r=n+Math.floor((i-n)/2);if(e[r].endLineNumber<t)n=r+1;else{if(!(e[r].startLineNumber>t)){for(;r>n&&e[r-1].startLineNumber<=t&&t<=e[r-1].endLineNumber;)r--;return r}i=r-1}}return n}acceptEdit(e,t,n,i,r){for(const s of this._pieces)s.acceptEdit(e,t,n,i,r)}}var Ci,vi=function(e,t){return function(n,i){t(n,i,e)}};let Li=Ci=class extends Vt{constructor(e,t,n,s,o,a,l){super(),this._textModel=e,this._bracketPairsTextModelPart=t,this._languageId=n,this._attachedViews=s,this._languageService=o,this._languageConfigurationService=a,this._treeSitterService=l,this._semanticTokens=new ki(this._languageService.languageIdCodec),this._onDidChangeLanguage=this._register(new i.vl),this.onDidChangeLanguage=this._onDidChangeLanguage.event,this._onDidChangeLanguageConfiguration=this._register(new i.vl),this.onDidChangeLanguageConfiguration=this._onDidChangeLanguageConfiguration.event,this._onDidChangeTokens=this._register(new i.vl),this.onDidChangeTokens=this._onDidChangeTokens.event,this._tokensDisposables=this._register(new r.Cm),this._register(this._languageConfigurationService.onDidChange((e=>{e.affects(this._languageId)&&this._onDidChangeLanguageConfiguration.fire({})}))),this._register(i.Jh.filter(Kn.OB.onDidChange,(e=>e.changedLanguages.includes(this._languageId)))((()=>{this.createPreferredTokenProvider()}))),this.createPreferredTokenProvider()}createGrammarTokens(){return this._register(new wi(this._languageService.languageIdCodec,this._textModel,(()=>this._languageId),this._attachedViews))}createTreeSitterTokens(){return this._register(new di(this._treeSitterService,this._languageService.languageIdCodec,this._textModel,(()=>this._languageId)))}createTokens(e){const t=void 0!==this._tokens;this._tokens?.dispose(),this._tokens=e?this.createTreeSitterTokens():this.createGrammarTokens(),this._tokensDisposables.clear(),this._tokensDisposables.add(this._tokens.onDidChangeTokens((e=>{this._emitModelTokensChangedEvent(e)}))),this._tokensDisposables.add(this._tokens.onDidChangeBackgroundTokenizationState((e=>{this._bracketPairsTextModelPart.handleDidChangeBackgroundTokenizationState()}))),t&&this._tokens.resetTokenization()}createPreferredTokenProvider(){Kn.OB.get(this._languageId)?this._tokens instanceof di||this.createTokens(!0):this._tokens instanceof wi||this.createTokens(!1)}handleLanguageConfigurationServiceChange(e){e.affects(this._languageId)&&this._onDidChangeLanguageConfiguration.fire({})}handleDidChangeContent(e){if(e.isFlush)this._semanticTokens.flush();else if(!e.isEolChange)for(const t of e.changes){const[e,n,i]=(0,c.W)(t.text);this._semanticTokens.acceptEdit(t.range,e,n,i,t.text.length>0?t.text.charCodeAt(0):0)}this._tokens.handleDidChangeContent(e)}handleDidChangeAttached(){this._tokens.handleDidChangeAttached()}getLineTokens(e){this.validateLineNumber(e);const t=this._tokens.getLineTokens(e);return this._semanticTokens.addSparseTokens(e,t)}_emitModelTokensChangedEvent(e){this._textModel._isDisposing()||(this._bracketPairsTextModelPart.handleDidChangeTokens(e),this._onDidChangeTokens.fire(e))}validateLineNumber(e){if(e<1||e>this._textModel.getLineCount())throw new l.D7("Illegal value for lineNumber")}get hasTokens(){return this._tokens.hasTokens}resetTokenization(){this._tokens.resetTokenization()}get backgroundTokenizationState(){return this._tokens.backgroundTokenizationState}forceTokenization(e){this.validateLineNumber(e),this._tokens.forceTokenization(e)}hasAccurateTokensForLine(e){return this.validateLineNumber(e),this._tokens.hasAccurateTokensForLine(e)}isCheapToTokenize(e){return this.validateLineNumber(e),this._tokens.isCheapToTokenize(e)}tokenizeIfCheap(e){this.validateLineNumber(e),this._tokens.tokenizeIfCheap(e)}getTokenTypeIfInsertingCharacter(e,t,n){return this._tokens.getTokenTypeIfInsertingCharacter(e,t,n)}tokenizeLineWithEdit(e,t,n){return this._tokens.tokenizeLineWithEdit(e,t,n)}setSemanticTokens(e,t){this._semanticTokens.set(e,t),this._emitModelTokensChangedEvent({semanticTokensApplied:null!==e,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]})}hasCompleteSemanticTokens(){return this._semanticTokens.isComplete()}hasSomeSemanticTokens(){return!this._semanticTokens.isEmpty()}setPartialSemanticTokens(e,t){if(this.hasCompleteSemanticTokens())return;const n=this._textModel.validateRange(this._semanticTokens.setPartial(e,t));this._emitModelTokensChangedEvent({semanticTokensApplied:!0,ranges:[{fromLineNumber:n.startLineNumber,toLineNumber:n.endLineNumber}]})}getWordAtPosition(e){this.assertNotDisposed();const t=this._textModel.validatePosition(e),n=this._textModel.getLineContent(t.lineNumber),i=this.getLineTokens(t.lineNumber),r=i.findTokenIndexAtOffset(t.column-1),[s,o]=Ci._findLanguageBoundaries(i,r),a=(0,k.Th)(t.column,this.getLanguageConfiguration(i.getLanguageId(r)).getWordDefinition(),n.substring(s,o),s);if(a&&a.startColumn<=e.column&&e.column<=a.endColumn)return a;if(r>0&&s===t.column-1){const[s,o]=Ci._findLanguageBoundaries(i,r-1),a=(0,k.Th)(t.column,this.getLanguageConfiguration(i.getLanguageId(r-1)).getWordDefinition(),n.substring(s,o),s);if(a&&a.startColumn<=e.column&&e.column<=a.endColumn)return a}return null}getLanguageConfiguration(e){return this._languageConfigurationService.getLanguageConfiguration(e)}static _findLanguageBoundaries(e,t){const n=e.getLanguageId(t);let i=0;for(let r=t;r>=0&&e.getLanguageId(r)===n;r--)i=e.getStartOffset(r);let r=e.getLineContent().length;for(let i=t,s=e.getCount();i<s&&e.getLanguageId(i)===n;i++)r=e.getEndOffset(i);return[i,r]}getWordUntilPosition(e){const t=this.getWordAtPosition(e);return t?{word:t.word.substr(0,e.column-t.startColumn),startColumn:t.startColumn,endColumn:e.column}:{word:"",startColumn:e.column,endColumn:e.column}}getLanguageId(){return this._languageId}getLanguageIdAtPosition(e,t){const n=this._textModel.validatePosition(new g.y(e,t)),i=this.getLineTokens(n.lineNumber);return i.getLanguageId(i.findTokenIndexAtOffset(n.column-1))}setLanguageId(e,t="api"){if(this._languageId===e)return;const n={oldLanguage:this._languageId,newLanguage:e,source:t};this._languageId=e,this._bracketPairsTextModelPart.handleDidChangeLanguage(n),this._tokens.resetTokenization(),this.createPreferredTokenProvider(),this._onDidChangeLanguage.fire(n),this._onDidChangeLanguageConfiguration.fire({})}};Li=Ci=function(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([vi(4,b.L),vi(5,te),vi(6,gi.ITreeSitterParserService)],Li);class wi extends ci{constructor(e,t,n,i){super(e,t,n),this._tokenizer=null,this._defaultBackgroundTokenizer=null,this._backgroundTokenizer=this._register(new r.HE),this._tokens=new _i(this._languageIdCodec),this._debugBackgroundTokenizer=this._register(new r.HE),this._attachedViewStates=this._register(new r.$w),this._register(Kn.dG.onDidChange((e=>{const t=this.getLanguageId();-1!==e.changedLanguages.indexOf(t)&&this.resetTokenization()}))),this.resetTokenization(),this._register(i.onDidChangeVisibleRanges((({view:e,state:t})=>{if(t){let n=this._attachedViewStates.get(e);n||(n=new ui((()=>this.refreshRanges(n.lineRanges))),this._attachedViewStates.set(e,n)),n.handleStateChange(t)}else this._attachedViewStates.deleteAndDispose(e)})))}resetTokenization(e=!0){this._tokens.flush(),this._debugBackgroundTokens?.flush(),this._debugBackgroundStates&&(this._debugBackgroundStates=new ii(this._textModel.getLineCount())),e&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]});const[t,n]=(()=>{if(this._textModel.isTooLargeForTokenization())return[null,null];const e=Kn.dG.get(this.getLanguageId());if(!e)return[null,null];let t;try{t=e.getInitialState()}catch(e){return(0,l.dz)(e),[null,null]}return[e,t]})();if(this._tokenizer=t&&n?new ni(this._textModel.getLineCount(),t,this._textModel,this._languageIdCodec):null,this._backgroundTokenizer.clear(),this._defaultBackgroundTokenizer=null,this._tokenizer){const e={setTokens:e=>{this.setTokens(e)},backgroundTokenizationFinished:()=>{2!==this._backgroundTokenizationState&&(this._backgroundTokenizationState=2,this._onDidChangeBackgroundTokenizationState.fire())},setEndState:(e,t)=>{if(!this._tokenizer)return;const n=this._tokenizer.store.getFirstInvalidEndStateLineNumber();null!==n&&e>=n&&this._tokenizer?.store.setEndState(e,t)}};t&&t.createBackgroundTokenizer&&!t.backgroundTokenizerShouldOnlyVerifyTokens&&(this._backgroundTokenizer.value=t.createBackgroundTokenizer(this._textModel,e)),this._backgroundTokenizer.value||this._textModel.isTooLargeForTokenization()||(this._backgroundTokenizer.value=this._defaultBackgroundTokenizer=new ai(this._tokenizer,e),this._defaultBackgroundTokenizer.handleChanges()),t?.backgroundTokenizerShouldOnlyVerifyTokens&&t.createBackgroundTokenizer?(this._debugBackgroundTokens=new _i(this._languageIdCodec),this._debugBackgroundStates=new ii(this._textModel.getLineCount()),this._debugBackgroundTokenizer.clear(),this._debugBackgroundTokenizer.value=t.createBackgroundTokenizer(this._textModel,{setTokens:e=>{this._debugBackgroundTokens?.setMultilineTokens(e,this._textModel)},backgroundTokenizationFinished(){},setEndState:(e,t)=>{this._debugBackgroundStates?.setEndState(e,t)}})):(this._debugBackgroundTokens=void 0,this._debugBackgroundStates=void 0,this._debugBackgroundTokenizer.value=void 0)}this.refreshAllVisibleLineTokens()}handleDidChangeAttached(){this._defaultBackgroundTokenizer?.handleChanges()}handleDidChangeContent(e){if(e.isFlush)this.resetTokenization(!1);else if(!e.isEolChange){for(const t of e.changes){const[e,n]=(0,c.W)(t.text);this._tokens.acceptEdit(t.range,e,n),this._debugBackgroundTokens?.acceptEdit(t.range,e,n)}this._debugBackgroundStates?.acceptChanges(e.changes),this._tokenizer&&this._tokenizer.store.acceptChanges(e.changes),this._defaultBackgroundTokenizer?.handleChanges()}}setTokens(e){const{changes:t}=this._tokens.setMultilineTokens(e,this._textModel);return t.length>0&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:t}),{changes:t}}refreshAllVisibleLineTokens(){const e=Un.M.joinMany([...this._attachedViewStates].map((([e,t])=>t.lineRanges)));this.refreshRanges(e)}refreshRanges(e){for(const t of e)this.refreshRange(t.startLineNumber,t.endLineNumberExclusive-1)}refreshRange(e,t){if(!this._tokenizer)return;e=Math.max(1,Math.min(this._textModel.getLineCount(),e)),t=Math.min(this._textModel.getLineCount(),t);const n=new Zn,{heuristicTokens:i}=this._tokenizer.tokenizeHeuristically(n,e,t),r=this.setTokens(n.finalize());if(i)for(const e of r.changes)this._backgroundTokenizer.value?.requestTokens(e.fromLineNumber,e.toLineNumber+1);this._defaultBackgroundTokenizer?.checkFinished()}forceTokenization(e){const t=new Zn;this._tokenizer?.updateTokensUntilLine(t,e),this.setTokens(t.finalize()),this._defaultBackgroundTokenizer?.checkFinished()}hasAccurateTokensForLine(e){return!this._tokenizer||this._tokenizer.hasAccurateTokensForLine(e)}isCheapToTokenize(e){return!this._tokenizer||this._tokenizer.isCheapToTokenize(e)}getLineTokens(e){const t=this._textModel.getLineContent(e),n=this._tokens.getTokens(this._textModel.getLanguageId(),e-1,t);if(this._debugBackgroundTokens&&this._debugBackgroundStates&&this._tokenizer&&this._debugBackgroundStates.getFirstInvalidEndStateLineNumberOrMax()>e&&this._tokenizer.store.getFirstInvalidEndStateLineNumberOrMax()>e){const i=this._debugBackgroundTokens.getTokens(this._textModel.getLanguageId(),e-1,t);!n.equals(i)&&this._debugBackgroundTokenizer.value?.reportMismatchingTokens&&this._debugBackgroundTokenizer.value.reportMismatchingTokens(e)}return n}getTokenTypeIfInsertingCharacter(e,t,n){if(!this._tokenizer)return 0;const i=this._textModel.validatePosition(new g.y(e,t));return this.forceTokenization(i.lineNumber),this._tokenizer.getTokenTypeIfInsertingCharacter(i,n)}tokenizeLineWithEdit(e,t,n){if(!this._tokenizer)return null;const i=this._textModel.validatePosition(e);return this.forceTokenization(i.lineNumber),this._tokenizer.tokenizeLineWithEdit(i,t,n)}get hasTokens(){return this._tokens.hasTokens}}class yi{constructor(){this.changeType=1}}class Si{static applyInjectedText(e,t){if(!t||0===t.length)return e;let n="",i=0;for(const r of t)n+=e.substring(i,r.column-1),i=r.column-1,n+=r.options.content;return n+=e.substring(i),n}static fromDecorations(e){const t=[];for(const n of e)n.options.before&&n.options.before.content.length>0&&t.push(new Si(n.ownerId,n.range.startLineNumber,n.range.startColumn,n.options.before,0)),n.options.after&&n.options.after.content.length>0&&t.push(new Si(n.ownerId,n.range.endLineNumber,n.range.endColumn,n.options.after,1));return t.sort(((e,t)=>e.lineNumber===t.lineNumber?e.column===t.column?e.order-t.order:e.column-t.column:e.lineNumber-t.lineNumber)),t}constructor(e,t,n,i,r){this.ownerId=e,this.lineNumber=t,this.column=n,this.options=i,this.order=r}}class xi{constructor(e,t,n){this.changeType=2,this.lineNumber=e,this.detail=t,this.injectedText=n}}class Ei{constructor(e,t){this.changeType=3,this.fromLineNumber=e,this.toLineNumber=t}}class Ni{constructor(e,t,n,i){this.changeType=4,this.injectedTexts=i,this.fromLineNumber=e,this.toLineNumber=t,this.detail=n}}class Ii{constructor(){this.changeType=5}}class Ti{constructor(e,t,n,i){this.changes=e,this.versionId=t,this.isUndoing=n,this.isRedoing=i,this.resultingSelection=null}containsEvent(e){for(let t=0,n=this.changes.length;t<n;t++)if(this.changes[t].changeType===e)return!0;return!1}static merge(e,t){const n=[].concat(e.changes).concat(t.changes),i=t.versionId,r=e.isUndoing||t.isUndoing,s=e.isRedoing||t.isRedoing;return new Ti(n,i,r,s)}}class Ai{constructor(e){this.changes=e}}class Ri{constructor(e,t){this.rawContentChangedEvent=e,this.contentChangedEvent=t}merge(e){const t=Ti.merge(this.rawContentChangedEvent,e.rawContentChangedEvent),n=Ri._mergeChangeEvents(this.contentChangedEvent,e.contentChangedEvent);return new Ri(t,n)}static _mergeChangeEvents(e,t){const n=[].concat(e.changes).concat(t.changes),i=t.eol,r=t.versionId,s=e.isUndoing||t.isUndoing,o=e.isRedoing||t.isRedoing,a=e.isFlush||t.isFlush;return{changes:n,eol:i,isEolChange:e.isEolChange&&t.isEolChange,versionId:r,isUndoing:s,isRedoing:o,isFlush:a}}}const Mi=(0,H.u1)("undoRedoService");class Di{static{this._ID=0}constructor(){this.id=Di._ID++,this.order=1}nextOrder(){return 0===this.id?0:this.order++}static{this.None=new Di}}class Oi{static{this._ID=0}constructor(){this.id=Oi._ID++,this.order=1}nextOrder(){return 0===this.id?0:this.order++}static{this.None=new Oi}}var Bi,Fi=function(e,t){return function(n,i){t(n,i,e)}};function Pi(e,t){let n;return n="string"==typeof e?function(e){const t=new Hn;return t.acceptChunk(e),t.finish()}(e):ce.nk(e)?function(e){const t=new Hn;let n;for(;"string"==typeof(n=e.read());)t.acceptChunk(n);return t.finish()}(e):e,n.create(t)}let zi=0;class Vi{constructor(e){this._source=e,this._eos=!1}read(){if(this._eos)return null;const e=[];let t=0,n=0;for(;;){const i=this._source.read();if(null===i)return this._eos=!0,0===t?null:e.join("");if(i.length>0&&(e[t++]=i,n+=i.length),n>=65536)return e.join("")}}}const qi=()=>{throw new Error("Invalid change accessor")};let Wi=class extends r.jG{static{Bi=this}static{this._MODEL_SYNC_LIMIT=52428800}static{this.LARGE_FILE_SIZE_THRESHOLD=20971520}static{this.LARGE_FILE_LINE_COUNT_THRESHOLD=3e5}static{this.LARGE_FILE_HEAP_OPERATION_THRESHOLD=268435456}static{this.DEFAULT_CREATION_OPTIONS={isForSimpleWidget:!1,tabSize:p.tabSize,indentSize:p.indentSize,insertSpaces:p.insertSpaces,detectIndentation:!1,defaultEOL:1,trimAutoWhitespace:p.trimAutoWhitespace,largeFileOptimizations:p.largeFileOptimizations,bracketPairColorizationOptions:p.bracketPairColorizationOptions}}static resolveOptions(e,t){if(t.detectIndentation){const n=$t(e,t.tabSize,t.insertSpaces);return new ce.X2({tabSize:n.tabSize,indentSize:"tabSize",insertSpaces:n.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL,bracketPairColorizationOptions:t.bracketPairColorizationOptions})}return new ce.X2(t)}get onDidChangeLanguage(){return this._tokenizationTextModelPart.onDidChangeLanguage}get onDidChangeLanguageConfiguration(){return this._tokenizationTextModelPart.onDidChangeLanguageConfiguration}get onDidChangeTokens(){return this._tokenizationTextModelPart.onDidChangeTokens}onDidChangeContent(e){return this._eventEmitter.slowEvent((t=>e(t.contentChangedEvent)))}onDidChangeContentOrInjectedText(e){return(0,r.qE)(this._eventEmitter.fastEvent((t=>e(t))),this._onDidChangeInjectedText.event((t=>e(t))))}_isDisposing(){return this.__isDisposing}get tokenization(){return this._tokenizationTextModelPart}get bracketPairs(){return this._bracketPairs}get guides(){return this._guidesTextModelPart}constructor(e,t,n,s=null,o,a,l,c){super(),this._undoRedoService=o,this._languageService=a,this._languageConfigurationService=l,this.instantiationService=c,this._onWillDispose=this._register(new i.vl),this.onWillDispose=this._onWillDispose.event,this._onDidChangeDecorations=this._register(new tr((e=>this.handleBeforeFireDecorationsChangedEvent(e)))),this.onDidChangeDecorations=this._onDidChangeDecorations.event,this._onDidChangeOptions=this._register(new i.vl),this.onDidChangeOptions=this._onDidChangeOptions.event,this._onDidChangeAttached=this._register(new i.vl),this.onDidChangeAttached=this._onDidChangeAttached.event,this._onDidChangeInjectedText=this._register(new i.vl),this._eventEmitter=this._register(new nr),this._languageSelectionListener=this._register(new r.HE),this._deltaDecorationCallCnt=0,this._attachedViews=new li,zi++,this.id="$model"+zi,this.isForSimpleWidget=n.isForSimpleWidget,this._associatedResource=null==s?u.r.parse("inmemory://model/"+zi):s,this._attachedEditorCount=0;const{textBuffer:d,disposable:g}=Pi(e,n.defaultEOL);this._buffer=d,this._bufferDisposable=g,this._options=Bi.resolveOptions(this._buffer,n);const m="string"==typeof t?t:t.languageId;"string"!=typeof t&&(this._languageSelectionListener.value=t.onDidChange((()=>this._setLanguage(t.languageId)))),this._bracketPairs=this._register(new bt(this,this._languageConfigurationService)),this._guidesTextModelPart=this._register(new Ht(this,this._languageConfigurationService)),this._decorationProvider=this._register(new yt(this)),this._tokenizationTextModelPart=this.instantiationService.createInstance(Li,this,this._bracketPairs,m,this._attachedViews);const p=this._buffer.getLineCount(),_=this._buffer.getValueLengthInRange(new f.Q(1,1,p,this._buffer.getLineLength(p)+1),0);n.largeFileOptimizations?(this._isTooLargeForTokenization=_>Bi.LARGE_FILE_SIZE_THRESHOLD||p>Bi.LARGE_FILE_LINE_COUNT_THRESHOLD,this._isTooLargeForHeapOperation=_>Bi.LARGE_FILE_HEAP_OPERATION_THRESHOLD):(this._isTooLargeForTokenization=!1,this._isTooLargeForHeapOperation=!1),this._isTooLargeForSyncing=_>Bi._MODEL_SYNC_LIMIT,this._versionId=1,this._alternativeVersionId=1,this._initialUndoRedoSnapshot=null,this._isDisposed=!1,this.__isDisposing=!1,this._instanceId=h.tk(zi),this._lastDecorationId=0,this._decorations=Object.create(null),this._decorationsTree=new Ki,this._commandManager=new Ft(this,this._undoRedoService),this._isUndoing=!1,this._isRedoing=!1,this._trimAutoWhitespaceLines=null,this._register(this._decorationProvider.onDidChange((()=>{this._onDidChangeDecorations.beginDeferredEmit(),this._onDidChangeDecorations.fire(),this._onDidChangeDecorations.endDeferredEmit()}))),this._languageService.requestRichLanguageFeatures(m),this._register(this._languageConfigurationService.onDidChange((e=>{this._bracketPairs.handleLanguageConfigurationServiceChange(e),this._tokenizationTextModelPart.handleLanguageConfigurationServiceChange(e)})))}dispose(){this.__isDisposing=!0,this._onWillDispose.fire(),this._tokenizationTextModelPart.dispose(),this._isDisposed=!0,super.dispose(),this._bufferDisposable.dispose(),this.__isDisposing=!1;const e=new qn([],"","\n",!1,!1,!0,!0);e.dispose(),this._buffer=e,this._bufferDisposable=r.jG.None}_assertNotDisposed(){if(this._isDisposed)throw new l.D7("Model is disposed!")}_emitContentChangedEvent(e,t){this.__isDisposing||(this._tokenizationTextModelPart.handleDidChangeContent(t),this._bracketPairs.handleDidChangeContent(t),this._eventEmitter.fire(new Ri(e,t)))}setValue(e){if(this._assertNotDisposed(),null==e)throw(0,l.Qg)();const{textBuffer:t,disposable:n}=Pi(e,this._options.defaultEOL);this._setValueFromTextBuffer(t,n)}_createContentChanged2(e,t,n,i,r,s,o,a){return{changes:[{range:e,rangeOffset:t,rangeLength:n,text:i}],eol:this._buffer.getEOL(),isEolChange:a,versionId:this.getVersionId(),isUndoing:r,isRedoing:s,isFlush:o}}_setValueFromTextBuffer(e,t){this._assertNotDisposed();const n=this.getFullModelRange(),i=this.getValueLengthInRange(n),r=this.getLineCount(),s=this.getLineMaxColumn(r);this._buffer=e,this._bufferDisposable.dispose(),this._bufferDisposable=t,this._increaseVersionId(),this._decorations=Object.create(null),this._decorationsTree=new Ki,this._commandManager.clear(),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new Ti([new yi],this._versionId,!1,!1),this._createContentChanged2(new f.Q(1,1,r,s),0,i,this.getValue(),!1,!1,!0,!1))}setEOL(e){this._assertNotDisposed();const t=1===e?"\r\n":"\n";if(this._buffer.getEOL()===t)return;const n=this.getFullModelRange(),i=this.getValueLengthInRange(n),r=this.getLineCount(),s=this.getLineMaxColumn(r);this._onBeforeEOLChange(),this._buffer.setEOL(t),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new Ti([new Ii],this._versionId,!1,!1),this._createContentChanged2(new f.Q(1,1,r,s),0,i,this.getValue(),!1,!1,!1,!0))}_onBeforeEOLChange(){this._decorationsTree.ensureAllNodesHaveRanges(this)}_onAfterEOLChange(){const e=this.getVersionId(),t=this._decorationsTree.collectNodesPostOrder();for(let n=0,i=t.length;n<i;n++){const i=t[n],r=i.range,s=i.cachedAbsoluteStart-i.start,o=this._buffer.getOffsetAt(r.startLineNumber,r.startColumn),a=this._buffer.getOffsetAt(r.endLineNumber,r.endColumn);i.cachedAbsoluteStart=o,i.cachedAbsoluteEnd=a,i.cachedVersionId=e,i.start=o-s,i.end=a-s,pn(i)}}onBeforeAttached(){return this._attachedEditorCount++,1===this._attachedEditorCount&&(this._tokenizationTextModelPart.handleDidChangeAttached(),this._onDidChangeAttached.fire(void 0)),this._attachedViews.attachView()}onBeforeDetached(e){this._attachedEditorCount--,0===this._attachedEditorCount&&(this._tokenizationTextModelPart.handleDidChangeAttached(),this._onDidChangeAttached.fire(void 0)),this._attachedViews.detachView(e)}isAttachedToEditor(){return this._attachedEditorCount>0}getAttachedEditorCount(){return this._attachedEditorCount}isTooLargeForSyncing(){return this._isTooLargeForSyncing}isTooLargeForTokenization(){return this._isTooLargeForTokenization}isTooLargeForHeapOperation(){return this._isTooLargeForHeapOperation}isDisposed(){return this._isDisposed}isDominatedByLongLines(){if(this._assertNotDisposed(),this.isTooLargeForTokenization())return!1;let e=0,t=0;const n=this._buffer.getLineCount();for(let i=1;i<=n;i++){const n=this._buffer.getLineLength(i);n>=1e4?t+=n:e+=n}return t>e}get uri(){return this._associatedResource}getOptions(){return this._assertNotDisposed(),this._options}getFormattingOptions(){return{tabSize:this._options.indentSize,insertSpaces:this._options.insertSpaces}}updateOptions(e){this._assertNotDisposed();const t=void 0!==e.tabSize?e.tabSize:this._options.tabSize,n=void 0!==e.indentSize?e.indentSize:this._options.originalIndentSize,i=void 0!==e.insertSpaces?e.insertSpaces:this._options.insertSpaces,r=void 0!==e.trimAutoWhitespace?e.trimAutoWhitespace:this._options.trimAutoWhitespace,s=void 0!==e.bracketColorizationOptions?e.bracketColorizationOptions:this._options.bracketPairColorizationOptions,o=new ce.X2({tabSize:t,indentSize:n,insertSpaces:i,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:r,bracketPairColorizationOptions:s});if(this._options.equals(o))return;const a=this._options.createChangeEvent(o);this._options=o,this._bracketPairs.handleDidChangeOptions(a),this._decorationProvider.handleDidChangeOptions(a),this._onDidChangeOptions.fire(a)}detectIndentation(e,t){this._assertNotDisposed();const n=$t(this._buffer,t,e);this.updateOptions({insertSpaces:n.insertSpaces,tabSize:n.tabSize,indentSize:n.tabSize})}normalizeIndentation(e){return this._assertNotDisposed(),function(e,t,n){let i=h.HG(e);return-1===i&&(i=e.length),function(e,t,n){let i=0;for(let n=0;n<e.length;n++)"\t"===e.charAt(n)?i=d.nextIndentTabStop(i,t):i++;let r="";if(!n){const e=Math.floor(i/t);i%=t;for(let t=0;t<e;t++)r+="\t"}for(let e=0;e<i;e++)r+=" ";return r}(e.substring(0,i),t,n)+e.substring(i)}(e,this._options.indentSize,this._options.insertSpaces)}getVersionId(){return this._assertNotDisposed(),this._versionId}mightContainRTL(){return this._buffer.mightContainRTL()}mightContainUnusualLineTerminators(){return this._buffer.mightContainUnusualLineTerminators()}removeUnusualLineTerminators(e=null){const t=this.findMatches(h._J.source,!1,!0,!1,null,!1,1073741824);this._buffer.resetMightContainUnusualLineTerminators(),this.pushEditOperations(e,t.map((e=>({range:e.range,text:null}))),(()=>null))}mightContainNonBasicASCII(){return this._buffer.mightContainNonBasicASCII()}getAlternativeVersionId(){return this._assertNotDisposed(),this._alternativeVersionId}getInitialUndoRedoSnapshot(){return this._assertNotDisposed(),this._initialUndoRedoSnapshot}getOffsetAt(e){this._assertNotDisposed();const t=this._validatePosition(e.lineNumber,e.column,0);return this._buffer.getOffsetAt(t.lineNumber,t.column)}getPositionAt(e){this._assertNotDisposed();const t=Math.min(this._buffer.getLength(),Math.max(0,e));return this._buffer.getPositionAt(t)}_increaseVersionId(){this._versionId=this._versionId+1,this._alternativeVersionId=this._versionId}_overwriteVersionId(e){this._versionId=e}_overwriteAlternativeVersionId(e){this._alternativeVersionId=e}_overwriteInitialUndoRedoSnapshot(e){this._initialUndoRedoSnapshot=e}getValue(e,t=!1){if(this._assertNotDisposed(),this.isTooLargeForHeapOperation())throw new l.D7("Operation would exceed heap memory limits");const n=this.getFullModelRange(),i=this.getValueInRange(n,e);return t?this._buffer.getBOM()+i:i}createSnapshot(e=!1){return new Vi(this._buffer.createSnapshot(e))}getValueLength(e,t=!1){this._assertNotDisposed();const n=this.getFullModelRange(),i=this.getValueLengthInRange(n,e);return t?this._buffer.getBOM().length+i:i}getValueInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueInRange(this.validateRange(e),t)}getValueLengthInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueLengthInRange(this.validateRange(e),t)}getCharacterCountInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getCharacterCountInRange(this.validateRange(e),t)}getLineCount(){return this._assertNotDisposed(),this._buffer.getLineCount()}getLineContent(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new l.D7("Illegal value for lineNumber");return this._buffer.getLineContent(e)}getLineLength(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new l.D7("Illegal value for lineNumber");return this._buffer.getLineLength(e)}getLinesContent(){if(this._assertNotDisposed(),this.isTooLargeForHeapOperation())throw new l.D7("Operation would exceed heap memory limits");return this._buffer.getLinesContent()}getEOL(){return this._assertNotDisposed(),this._buffer.getEOL()}getEndOfLineSequence(){return this._assertNotDisposed(),"\n"===this._buffer.getEOL()?0:1}getLineMinColumn(e){return this._assertNotDisposed(),1}getLineMaxColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new l.D7("Illegal value for lineNumber");return this._buffer.getLineLength(e)+1}getLineFirstNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new l.D7("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(e)}getLineLastNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new l.D7("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(e)}_validateRangeRelaxedNoAllocations(e){const t=this._buffer.getLineCount(),n=e.startLineNumber,i=e.startColumn;let r=Math.floor("number"!=typeof n||isNaN(n)?1:n),s=Math.floor("number"!=typeof i||isNaN(i)?1:i);if(r<1)r=1,s=1;else if(r>t)r=t,s=this.getLineMaxColumn(r);else if(s<=1)s=1;else{const e=this.getLineMaxColumn(r);s>=e&&(s=e)}const o=e.endLineNumber,a=e.endColumn;let l=Math.floor("number"!=typeof o||isNaN(o)?1:o),h=Math.floor("number"!=typeof a||isNaN(a)?1:a);if(l<1)l=1,h=1;else if(l>t)l=t,h=this.getLineMaxColumn(l);else if(h<=1)h=1;else{const e=this.getLineMaxColumn(l);h>=e&&(h=e)}return n===r&&i===s&&o===l&&a===h&&e instanceof f.Q&&!(e instanceof m.L)?e:new f.Q(r,s,l,h)}_isValidPosition(e,t,n){if("number"!=typeof e||"number"!=typeof t)return!1;if(isNaN(e)||isNaN(t))return!1;if(e<1||t<1)return!1;if((0|e)!==e||(0|t)!==t)return!1;if(e>this._buffer.getLineCount())return!1;if(1===t)return!0;if(t>this.getLineMaxColumn(e))return!1;if(1===n){const n=this._buffer.getLineCharCode(e,t-2);if(h.pc(n))return!1}return!0}_validatePosition(e,t,n){const i=Math.floor("number"!=typeof e||isNaN(e)?1:e),r=Math.floor("number"!=typeof t||isNaN(t)?1:t),s=this._buffer.getLineCount();if(i<1)return new g.y(1,1);if(i>s)return new g.y(s,this.getLineMaxColumn(s));if(r<=1)return new g.y(i,1);const o=this.getLineMaxColumn(i);if(r>=o)return new g.y(i,o);if(1===n){const e=this._buffer.getLineCharCode(i,r-2);if(h.pc(e))return new g.y(i,r-1)}return new g.y(i,r)}validatePosition(e){return this._assertNotDisposed(),e instanceof g.y&&this._isValidPosition(e.lineNumber,e.column,1)?e:this._validatePosition(e.lineNumber,e.column,1)}_isValidRange(e,t){const n=e.startLineNumber,i=e.startColumn,r=e.endLineNumber,s=e.endColumn;if(!this._isValidPosition(n,i,0))return!1;if(!this._isValidPosition(r,s,0))return!1;if(1===t){const e=i>1?this._buffer.getLineCharCode(n,i-2):0,t=s>1&&s<=this._buffer.getLineLength(r)?this._buffer.getLineCharCode(r,s-2):0,o=h.pc(e),a=h.pc(t);return!o&&!a}return!0}validateRange(e){if(this._assertNotDisposed(),e instanceof f.Q&&!(e instanceof m.L)&&this._isValidRange(e,1))return e;const t=this._validatePosition(e.startLineNumber,e.startColumn,0),n=this._validatePosition(e.endLineNumber,e.endColumn,0),i=t.lineNumber,r=t.column,s=n.lineNumber,o=n.column;{const e=r>1?this._buffer.getLineCharCode(i,r-2):0,t=o>1&&o<=this._buffer.getLineLength(s)?this._buffer.getLineCharCode(s,o-2):0,n=h.pc(e),a=h.pc(t);return n||a?i===s&&r===o?new f.Q(i,r-1,s,o-1):n&&a?new f.Q(i,r-1,s,o+1):n?new f.Q(i,r-1,s,o):new f.Q(i,r,s,o+1):new f.Q(i,r,s,o)}}modifyPosition(e,t){this._assertNotDisposed();const n=this.getOffsetAt(e)+t;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,n)))}getFullModelRange(){this._assertNotDisposed();const e=this.getLineCount();return new f.Q(1,1,e,this.getLineMaxColumn(e))}findMatchesLineByLine(e,t,n,i){return this._buffer.findMatchesLineByLine(e,t,n,i)}findMatches(e,t,n,i,r,s,o=999){this._assertNotDisposed();let a=null;null!==t&&(Array.isArray(t)||(t=[t]),t.every((e=>f.Q.isIRange(e)))&&(a=t.map((e=>this.validateRange(e))))),null===a&&(a=[this.getFullModelRange()]),a=a.sort(((e,t)=>e.startLineNumber-t.startLineNumber||e.startColumn-t.startColumn));const l=[];let h;if(l.push(a.reduce(((e,t)=>f.Q.areIntersecting(e,t)?e.plusRange(t):(l.push(e),t)))),!n&&e.indexOf("\n")<0){const t=new An.lt(e,n,i,r).parseSearchRequest();if(!t)return[];h=e=>this.findMatchesLineByLine(e,t,s,o)}else h=t=>An.hB.findMatches(this,new An.lt(e,n,i,r),t,s,o);return l.map(h).reduce(((e,t)=>e.concat(t)),[])}findNextMatch(e,t,n,i,r,s){this._assertNotDisposed();const o=this.validatePosition(t);if(!n&&e.indexOf("\n")<0){const t=new An.lt(e,n,i,r).parseSearchRequest();if(!t)return null;const a=this.getLineCount();let l=new f.Q(o.lineNumber,o.column,a,this.getLineMaxColumn(a)),h=this.findMatchesLineByLine(l,t,s,1);return An.hB.findNextMatch(this,new An.lt(e,n,i,r),o,s),h.length>0?h[0]:(l=new f.Q(1,1,o.lineNumber,this.getLineMaxColumn(o.lineNumber)),h=this.findMatchesLineByLine(l,t,s,1),h.length>0?h[0]:null)}return An.hB.findNextMatch(this,new An.lt(e,n,i,r),o,s)}findPreviousMatch(e,t,n,i,r,s){this._assertNotDisposed();const o=this.validatePosition(t);return An.hB.findPreviousMatch(this,new An.lt(e,n,i,r),o,s)}pushStackElement(){this._commandManager.pushStackElement()}popStackElement(){this._commandManager.popStackElement()}pushEOL(e){if(("\n"===this.getEOL()?0:1)!==e)try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),null===this._initialUndoRedoSnapshot&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEOL(e)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_validateEditOperation(e){return e instanceof ce.Wo?e:new ce.Wo(e.identifier||null,this.validateRange(e.range),e.text,e.forceMoveMarkers||!1,e.isAutoWhitespaceEdit||!1,e._isTracked||!1)}_validateEditOperations(e){const t=[];for(let n=0,i=e.length;n<i;n++)t[n]=this._validateEditOperation(e[n]);return t}pushEditOperations(e,t,n,i){try{return this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._pushEditOperations(e,this._validateEditOperations(t),n,i)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_pushEditOperations(e,t,n,i){if(this._options.trimAutoWhitespace&&this._trimAutoWhitespaceLines){const n=t.map((e=>({range:this.validateRange(e.range),text:e.text})));let i=!0;if(e)for(let t=0,r=e.length;t<r;t++){const r=e[t];let s=!1;for(let e=0,t=n.length;e<t;e++){const t=n[e].range,i=t.startLineNumber>r.endLineNumber,o=r.startLineNumber>t.endLineNumber;if(!i&&!o){s=!0;break}}if(!s){i=!1;break}}if(i)for(let e=0,i=this._trimAutoWhitespaceLines.length;e<i;e++){const i=this._trimAutoWhitespaceLines[e],r=this.getLineMaxColumn(i);let s=!0;for(let e=0,t=n.length;e<t;e++){const t=n[e].range,o=n[e].text;if(!(i<t.startLineNumber||i>t.endLineNumber||i===t.startLineNumber&&t.startColumn===r&&t.isEmpty()&&o&&o.length>0&&"\n"===o.charAt(0)||i===t.startLineNumber&&1===t.startColumn&&t.isEmpty()&&o&&o.length>0&&"\n"===o.charAt(o.length-1))){s=!1;break}}if(s){const e=new f.Q(i,1,i,r);t.push(new ce.Wo(null,e,null,!1,!1,!1))}}this._trimAutoWhitespaceLines=null}return null===this._initialUndoRedoSnapshot&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEditOperation(e,t,n,i)}_applyUndo(e,t,n,i){const r=e.map((e=>{const t=this.getPositionAt(e.newPosition),n=this.getPositionAt(e.newEnd);return{range:new f.Q(t.lineNumber,t.column,n.lineNumber,n.column),text:e.oldText}}));this._applyUndoRedoEdits(r,t,!0,!1,n,i)}_applyRedo(e,t,n,i){const r=e.map((e=>{const t=this.getPositionAt(e.oldPosition),n=this.getPositionAt(e.oldEnd);return{range:new f.Q(t.lineNumber,t.column,n.lineNumber,n.column),text:e.newText}}));this._applyUndoRedoEdits(r,t,!1,!0,n,i)}_applyUndoRedoEdits(e,t,n,i,r,s){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._isUndoing=n,this._isRedoing=i,this.applyEdits(e,!1),this.setEOL(t),this._overwriteAlternativeVersionId(r)}finally{this._isUndoing=!1,this._isRedoing=!1,this._eventEmitter.endDeferredEmit(s),this._onDidChangeDecorations.endDeferredEmit()}}applyEdits(e,t=!1){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit();const n=this._validateEditOperations(e);return this._doApplyEdits(n,t)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_doApplyEdits(e,t){const n=this._buffer.getLineCount(),i=this._buffer.applyEdits(e,this._options.trimAutoWhitespace,t),r=this._buffer.getLineCount(),s=i.changes;if(this._trimAutoWhitespaceLines=i.trimAutoWhitespaceLineNumbers,0!==s.length){for(let e=0,t=s.length;e<t;e++){const t=s[e];this._decorationsTree.acceptReplace(t.rangeOffset,t.rangeLength,t.text.length,t.forceMoveMarkers)}const e=[];this._increaseVersionId();let t=n;for(let n=0,i=s.length;n<i;n++){const i=s[n],[a]=(0,c.W)(i.text);this._onDidChangeDecorations.fire();const l=i.range.startLineNumber,h=i.range.endLineNumber,u=h-l,d=a,f=Math.min(u,d),m=d-u,p=r-t-m+l,_=p,b=p+d,k=this._decorationsTree.getInjectedTextInInterval(this,this.getOffsetAt(new g.y(_,1)),this.getOffsetAt(new g.y(b,this.getLineMaxColumn(b))),0),C=Si.fromDecorations(k),v=new o.j3(C);for(let t=f;t>=0;t--){const n=l+t,i=p+t;v.takeFromEndWhile((e=>e.lineNumber>i));const r=v.takeFromEndWhile((e=>e.lineNumber===i));e.push(new xi(n,this.getLineContent(i),r))}if(f<u){const t=l+f;e.push(new Ei(t+1,h))}if(f<d){const n=new o.j3(C),i=l+f,s=d-f,a=r-t-s+i+1,h=[],u=[];for(let e=0;e<s;e++){const t=a+e;u[e]=this.getLineContent(t),n.takeWhile((e=>e.lineNumber<t)),h[e]=n.takeWhile((e=>e.lineNumber===t))}e.push(new Ni(i+1,l+d,u,h))}t+=m}this._emitContentChangedEvent(new Ti(e,this.getVersionId(),this._isUndoing,this._isRedoing),{changes:s,eol:this._buffer.getEOL(),isEolChange:!1,versionId:this.getVersionId(),isUndoing:this._isUndoing,isRedoing:this._isRedoing,isFlush:!1})}return null===i.reverseEdits?void 0:i.reverseEdits}undo(){return this._undoRedoService.undo(this.uri)}canUndo(){return this._undoRedoService.canUndo(this.uri)}redo(){return this._undoRedoService.redo(this.uri)}canRedo(){return this._undoRedoService.canRedo(this.uri)}handleBeforeFireDecorationsChangedEvent(e){if(null===e||0===e.size)return;const t=Array.from(e).map((e=>new xi(e,this.getLineContent(e),this._getInjectedTextInLine(e))));this._onDidChangeInjectedText.fire(new Ai(t))}changeDecorations(e,t=0){this._assertNotDisposed();try{return this._onDidChangeDecorations.beginDeferredEmit(),this._changeDecorations(t,e)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_changeDecorations(e,t){const n={addDecoration:(t,n)=>this._deltaDecorationsImpl(e,[],[{range:t,options:n}])[0],changeDecoration:(e,t)=>{this._changeDecorationImpl(e,t)},changeDecorationOptions:(e,t)=>{this._changeDecorationOptionsImpl(e,er(t))},removeDecoration:t=>{this._deltaDecorationsImpl(e,[t],[])},deltaDecorations:(t,n)=>0===t.length&&0===n.length?[]:this._deltaDecorationsImpl(e,t,n)};let i=null;try{i=t(n)}catch(e){(0,l.dz)(e)}return n.addDecoration=qi,n.changeDecoration=qi,n.changeDecorationOptions=qi,n.removeDecoration=qi,n.deltaDecorations=qi,i}deltaDecorations(e,t,n=0){if(this._assertNotDisposed(),e||(e=[]),0===e.length&&0===t.length)return[];try{return this._deltaDecorationCallCnt++,this._deltaDecorationCallCnt>1&&(console.warn("Invoking deltaDecorations recursively could lead to leaking decorations."),(0,l.dz)(new Error("Invoking deltaDecorations recursively could lead to leaking decorations."))),this._onDidChangeDecorations.beginDeferredEmit(),this._deltaDecorationsImpl(n,e,t)}finally{this._onDidChangeDecorations.endDeferredEmit(),this._deltaDecorationCallCnt--}}_getTrackedRange(e){return this.getDecorationRange(e)}_setTrackedRange(e,t,n){const i=e?this._decorations[e]:null;if(!i)return t?this._deltaDecorationsImpl(0,[],[{range:t,options:Ji[n]}],!0)[0]:null;if(!t)return this._decorationsTree.delete(i),delete this._decorations[i.id],null;const r=this._validateRangeRelaxedNoAllocations(t),s=this._buffer.getOffsetAt(r.startLineNumber,r.startColumn),o=this._buffer.getOffsetAt(r.endLineNumber,r.endColumn);return this._decorationsTree.delete(i),i.reset(this.getVersionId(),s,o,r),i.setOptions(Ji[n]),this._decorationsTree.insert(i),i.id}removeAllDecorationsWithOwnerId(e){if(this._isDisposed)return;const t=this._decorationsTree.collectNodesFromOwner(e);for(let e=0,n=t.length;e<n;e++){const n=t[e];this._decorationsTree.delete(n),delete this._decorations[n.id]}}getDecorationOptions(e){const t=this._decorations[e];return t?t.options:null}getDecorationRange(e){const t=this._decorations[e];return t?this._decorationsTree.getNodeRange(this,t):null}getLineDecorations(e,t=0,n=!1){return e<1||e>this.getLineCount()?[]:this.getLinesDecorations(e,e,t,n)}getLinesDecorations(e,t,n=0,i=!1,r=!1){const s=this.getLineCount(),a=Math.min(s,Math.max(1,e)),l=Math.min(s,Math.max(1,t)),h=this.getLineMaxColumn(l),u=new f.Q(a,1,l,h),c=this._getDecorationsInRange(u,n,i,r);return(0,o.E4)(c,this._decorationProvider.getDecorationsInRange(u,n,i)),c}getDecorationsInRange(e,t=0,n=!1,i=!1,r=!1){const s=this.validateRange(e),a=this._getDecorationsInRange(s,t,n,r);return(0,o.E4)(a,this._decorationProvider.getDecorationsInRange(s,t,n,i)),a}getOverviewRulerDecorations(e=0,t=!1){return this._decorationsTree.getAll(this,e,t,!0,!1)}getInjectedTextDecorations(e=0){return this._decorationsTree.getAllInjectedText(this,e)}_getInjectedTextInLine(e){const t=this._buffer.getOffsetAt(e,1),n=t+this._buffer.getLineLength(e),i=this._decorationsTree.getInjectedTextInInterval(this,t,n,0);return Si.fromDecorations(i).filter((t=>t.lineNumber===e))}getAllDecorations(e=0,t=!1){let n=this._decorationsTree.getAll(this,e,t,!1,!1);return n=n.concat(this._decorationProvider.getAllDecorations(e,t)),n}getAllMarginDecorations(e=0){return this._decorationsTree.getAll(this,e,!1,!1,!0)}_getDecorationsInRange(e,t,n,i){const r=this._buffer.getOffsetAt(e.startLineNumber,e.startColumn),s=this._buffer.getOffsetAt(e.endLineNumber,e.endColumn);return this._decorationsTree.getAllInInterval(this,r,s,t,n,i)}getRangeAt(e,t){return this._buffer.getRangeAt(e,t-e)}_changeDecorationImpl(e,t){const n=this._decorations[e];if(!n)return;if(n.options.after){const t=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(t.endLineNumber)}if(n.options.before){const t=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(t.startLineNumber)}const i=this._validateRangeRelaxedNoAllocations(t),r=this._buffer.getOffsetAt(i.startLineNumber,i.startColumn),s=this._buffer.getOffsetAt(i.endLineNumber,i.endColumn);this._decorationsTree.delete(n),n.reset(this.getVersionId(),r,s,i),this._decorationsTree.insert(n),this._onDidChangeDecorations.checkAffectedAndFire(n.options),n.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(i.endLineNumber),n.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(i.startLineNumber)}_changeDecorationOptionsImpl(e,t){const n=this._decorations[e];if(!n)return;const i=!(!n.options.overviewRuler||!n.options.overviewRuler.color),r=!(!t.overviewRuler||!t.overviewRuler.color);if(this._onDidChangeDecorations.checkAffectedAndFire(n.options),this._onDidChangeDecorations.checkAffectedAndFire(t),n.options.after||t.after){const e=this._decorationsTree.getNodeRange(this,n);this._onDidChangeDecorations.recordLineAffectedByInjectedText(e.endLineNumber)}if(n.options.before||t.before){const e=this._decorationsTree.getNodeRange(this,n);this._onDidChangeDecorations.recordLineAffectedByInjectedText(e.startLineNumber)}const s=i!==r,o=function(e){return!!e.after||!!e.before}(t)!==Ui(n);s||o?(this._decorationsTree.delete(n),n.setOptions(t),this._decorationsTree.insert(n)):n.setOptions(t)}_deltaDecorationsImpl(e,t,n,i=!1){const r=this.getVersionId(),s=t.length;let o=0;const a=n.length;let l=0;this._onDidChangeDecorations.beginDeferredEmit();try{const h=new Array(a);for(;o<s||l<a;){let u=null;if(o<s){do{u=this._decorations[t[o++]]}while(!u&&o<s);if(u){if(u.options.after){const e=this._decorationsTree.getNodeRange(this,u);this._onDidChangeDecorations.recordLineAffectedByInjectedText(e.endLineNumber)}if(u.options.before){const e=this._decorationsTree.getNodeRange(this,u);this._onDidChangeDecorations.recordLineAffectedByInjectedText(e.startLineNumber)}this._decorationsTree.delete(u),i||this._onDidChangeDecorations.checkAffectedAndFire(u.options)}}if(l<a){if(!u){const e=++this._lastDecorationId,t=`${this._instanceId};${e}`;u=new sn(t,0,0),this._decorations[t]=u}const t=n[l],s=this._validateRangeRelaxedNoAllocations(t.range),o=er(t.options),a=this._buffer.getOffsetAt(s.startLineNumber,s.startColumn),c=this._buffer.getOffsetAt(s.endLineNumber,s.endColumn);u.ownerId=e,u.reset(r,a,c,s),u.setOptions(o),u.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(s.endLineNumber),u.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(s.startLineNumber),i||this._onDidChangeDecorations.checkAffectedAndFire(o),this._decorationsTree.insert(u),h[l]=u.id,l++}else u&&delete this._decorations[u.id]}return h}finally{this._onDidChangeDecorations.endDeferredEmit()}}getLanguageId(){return this.tokenization.getLanguageId()}setLanguage(e,t){"string"==typeof e?(this._languageSelectionListener.clear(),this._setLanguage(e,t)):(this._languageSelectionListener.value=e.onDidChange((()=>this._setLanguage(e.languageId,t))),this._setLanguage(e.languageId,t))}_setLanguage(e,t){this.tokenization.setLanguageId(e,t),this._languageService.requestRichLanguageFeatures(e)}getLanguageIdAtPosition(e,t){return this.tokenization.getLanguageIdAtPosition(e,t)}getWordAtPosition(e){return this._tokenizationTextModelPart.getWordAtPosition(e)}getWordUntilPosition(e){return this._tokenizationTextModelPart.getWordUntilPosition(e)}normalizePosition(e,t){return e}getLineIndentColumn(e){return function(e){let t=0;for(const n of e){if(" "!==n&&"\t"!==n)break;t++}return t}(this.getLineContent(e))+1}};function Hi(e){return!(!e.options.overviewRuler||!e.options.overviewRuler.color)}function Ui(e){return!!e.options.after||!!e.options.before}Wi=Bi=function(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([Fi(4,Mi),Fi(5,b.L),Fi(6,te),Fi(7,H._Y)],Wi);class Ki{constructor(){this._decorationsTree0=new an,this._decorationsTree1=new an,this._injectedTextDecorationsTree=new an}ensureAllNodesHaveRanges(e){this.getAll(e,0,!1,!1,!1)}_ensureNodesHaveRanges(e,t){for(const n of t)null===n.range&&(n.range=e.getRangeAt(n.cachedAbsoluteStart,n.cachedAbsoluteEnd));return t}getAllInInterval(e,t,n,i,r,s){const o=e.getVersionId(),a=this._intervalSearch(t,n,i,r,o,s);return this._ensureNodesHaveRanges(e,a)}_intervalSearch(e,t,n,i,r,s){const o=this._decorationsTree0.intervalSearch(e,t,n,i,r,s),a=this._decorationsTree1.intervalSearch(e,t,n,i,r,s),l=this._injectedTextDecorationsTree.intervalSearch(e,t,n,i,r,s);return o.concat(a).concat(l)}getInjectedTextInInterval(e,t,n,i){const r=e.getVersionId(),s=this._injectedTextDecorationsTree.intervalSearch(t,n,i,!1,r,!1);return this._ensureNodesHaveRanges(e,s).filter((e=>e.options.showIfCollapsed||!e.range.isEmpty()))}getAllInjectedText(e,t){const n=e.getVersionId(),i=this._injectedTextDecorationsTree.search(t,!1,n,!1);return this._ensureNodesHaveRanges(e,i).filter((e=>e.options.showIfCollapsed||!e.range.isEmpty()))}getAll(e,t,n,i,r){const s=e.getVersionId(),o=this._search(t,n,i,s,r);return this._ensureNodesHaveRanges(e,o)}_search(e,t,n,i,r){if(n)return this._decorationsTree1.search(e,t,i,r);{const n=this._decorationsTree0.search(e,t,i,r),s=this._decorationsTree1.search(e,t,i,r),o=this._injectedTextDecorationsTree.search(e,t,i,r);return n.concat(s).concat(o)}}collectNodesFromOwner(e){const t=this._decorationsTree0.collectNodesFromOwner(e),n=this._decorationsTree1.collectNodesFromOwner(e),i=this._injectedTextDecorationsTree.collectNodesFromOwner(e);return t.concat(n).concat(i)}collectNodesPostOrder(){const e=this._decorationsTree0.collectNodesPostOrder(),t=this._decorationsTree1.collectNodesPostOrder(),n=this._injectedTextDecorationsTree.collectNodesPostOrder();return e.concat(t).concat(n)}insert(e){Ui(e)?this._injectedTextDecorationsTree.insert(e):Hi(e)?this._decorationsTree1.insert(e):this._decorationsTree0.insert(e)}delete(e){Ui(e)?this._injectedTextDecorationsTree.delete(e):Hi(e)?this._decorationsTree1.delete(e):this._decorationsTree0.delete(e)}getNodeRange(e,t){const n=e.getVersionId();return t.cachedVersionId!==n&&this._resolveNode(t,n),null===t.range&&(t.range=e.getRangeAt(t.cachedAbsoluteStart,t.cachedAbsoluteEnd)),t.range}_resolveNode(e,t){Ui(e)?this._injectedTextDecorationsTree.resolveNode(e,t):Hi(e)?this._decorationsTree1.resolveNode(e,t):this._decorationsTree0.resolveNode(e,t)}acceptReplace(e,t,n,i){this._decorationsTree0.acceptReplace(e,t,n,i),this._decorationsTree1.acceptReplace(e,t,n,i),this._injectedTextDecorationsTree.acceptReplace(e,t,n,i)}}function ji(e){return e.replace(/[^a-z0-9\-_]/gi," ")}class $i{constructor(e){this.color=e.color||"",this.darkColor=e.darkColor||""}}class Gi extends $i{constructor(e){super(e),this._resolvedColor=null,this.position="number"==typeof e.position?e.position:ce.A5.Center}getColor(e){return this._resolvedColor||("light"!==e.type&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=null}_resolveColor(e,t){if("string"==typeof e)return e;const n=e?t.getColor(e.id):null;return n?n.toString():""}}class Qi{constructor(e){this.position=e?.position??ce.ZS.Center,this.persistLane=e?.persistLane}}class Yi extends $i{constructor(e){super(e),this.position=e.position,this.sectionHeaderStyle=e.sectionHeaderStyle??null,this.sectionHeaderText=e.sectionHeaderText??null}getColor(e){return this._resolvedColor||("light"!==e.type&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=void 0}_resolveColor(e,t){return"string"==typeof e?a.Q1.fromHex(e):t.getColor(e.id)}}class Xi{static from(e){return e instanceof Xi?e:new Xi(e)}constructor(e){this.content=e.content||"",this.inlineClassName=e.inlineClassName||null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.attachedData=e.attachedData||null,this.cursorStops=e.cursorStops||null}}class Zi{static register(e){return new Zi(e)}static createDynamic(e){return new Zi(e)}constructor(e){this.description=e.description,this.blockClassName=e.blockClassName?ji(e.blockClassName):null,this.blockDoesNotCollapse=e.blockDoesNotCollapse??null,this.blockIsAfterEnd=e.blockIsAfterEnd??null,this.blockPadding=e.blockPadding??null,this.stickiness=e.stickiness||0,this.zIndex=e.zIndex||0,this.className=e.className?ji(e.className):null,this.shouldFillLineOnLineBreak=e.shouldFillLineOnLineBreak??null,this.hoverMessage=e.hoverMessage||null,this.glyphMarginHoverMessage=e.glyphMarginHoverMessage||null,this.lineNumberHoverMessage=e.lineNumberHoverMessage||null,this.isWholeLine=e.isWholeLine||!1,this.showIfCollapsed=e.showIfCollapsed||!1,this.collapseOnReplaceEdit=e.collapseOnReplaceEdit||!1,this.overviewRuler=e.overviewRuler?new Gi(e.overviewRuler):null,this.minimap=e.minimap?new Yi(e.minimap):null,this.glyphMargin=e.glyphMarginClassName?new Qi(e.glyphMargin):null,this.glyphMarginClassName=e.glyphMarginClassName?ji(e.glyphMarginClassName):null,this.linesDecorationsClassName=e.linesDecorationsClassName?ji(e.linesDecorationsClassName):null,this.lineNumberClassName=e.lineNumberClassName?ji(e.lineNumberClassName):null,this.linesDecorationsTooltip=e.linesDecorationsTooltip?h.jy(e.linesDecorationsTooltip):null,this.firstLineDecorationClassName=e.firstLineDecorationClassName?ji(e.firstLineDecorationClassName):null,this.marginClassName=e.marginClassName?ji(e.marginClassName):null,this.inlineClassName=e.inlineClassName?ji(e.inlineClassName):null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.beforeContentClassName=e.beforeContentClassName?ji(e.beforeContentClassName):null,this.afterContentClassName=e.afterContentClassName?ji(e.afterContentClassName):null,this.after=e.after?Xi.from(e.after):null,this.before=e.before?Xi.from(e.before):null,this.hideInCommentTokens=e.hideInCommentTokens??!1,this.hideInStringTokens=e.hideInStringTokens??!1}}Zi.EMPTY=Zi.register({description:"empty"});const Ji=[Zi.register({description:"tracked-range-always-grows-when-typing-at-edges",stickiness:0}),Zi.register({description:"tracked-range-never-grows-when-typing-at-edges",stickiness:1}),Zi.register({description:"tracked-range-grows-only-when-typing-before",stickiness:2}),Zi.register({description:"tracked-range-grows-only-when-typing-after",stickiness:3})];function er(e){return e instanceof Zi?e:Zi.createDynamic(e)}class tr extends r.jG{constructor(e){super(),this.handleBeforeFire=e,this._actual=this._register(new i.vl),this.event=this._actual.event,this._affectedInjectedTextLines=null,this._deferredCnt=0,this._shouldFireDeferred=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._affectsGlyphMargin=!1,this._affectsLineNumber=!1}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(){this._deferredCnt--,0===this._deferredCnt&&(this._shouldFireDeferred&&this.doFire(),this._affectedInjectedTextLines?.clear(),this._affectedInjectedTextLines=null)}recordLineAffectedByInjectedText(e){this._affectedInjectedTextLines||(this._affectedInjectedTextLines=new Set),this._affectedInjectedTextLines.add(e)}checkAffectedAndFire(e){this._affectsMinimap||=!!e.minimap?.position,this._affectsOverviewRuler||=!!e.overviewRuler?.color,this._affectsGlyphMargin||=!!e.glyphMarginClassName,this._affectsLineNumber||=!!e.lineNumberClassName,this.tryFire()}fire(){this._affectsMinimap=!0,this._affectsOverviewRuler=!0,this._affectsGlyphMargin=!0,this.tryFire()}tryFire(){0===this._deferredCnt?this.doFire():this._shouldFireDeferred=!0}doFire(){this.handleBeforeFire(this._affectedInjectedTextLines);const e={affectsMinimap:this._affectsMinimap,affectsOverviewRuler:this._affectsOverviewRuler,affectsGlyphMargin:this._affectsGlyphMargin,affectsLineNumber:this._affectsLineNumber};this._shouldFireDeferred=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._affectsGlyphMargin=!1,this._actual.fire(e)}}class nr extends r.jG{constructor(){super(),this._fastEmitter=this._register(new i.vl),this.fastEvent=this._fastEmitter.event,this._slowEmitter=this._register(new i.vl),this.slowEvent=this._slowEmitter.event,this._deferredCnt=0,this._deferredEvent=null}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(e=null){if(this._deferredCnt--,0===this._deferredCnt&&null!==this._deferredEvent){this._deferredEvent.rawContentChangedEvent.resultingSelection=e;const t=this._deferredEvent;this._deferredEvent=null,this._fastEmitter.fire(t),this._slowEmitter.fire(t)}}fire(e){this._deferredCnt>0?this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(e):this._deferredEvent=e:(this._fastEmitter.fire(e),this._slowEmitter.fire(e))}}var ir,rr=n(1504),sr=n(2344),or=n(3072),ar=n(1386),lr=function(e,t){return function(n,i){t(n,i,e)}};function hr(e){return e.toString()}class ur{constructor(e,t,n){this.model=e,this._modelEventListeners=new r.Cm,this.model=e,this._modelEventListeners.add(e.onWillDispose((()=>t(e)))),this._modelEventListeners.add(e.onDidChangeLanguage((t=>n(e,t))))}dispose(){this._modelEventListeners.dispose()}}const cr=s.j9||s.zx?1:2;class dr{constructor(e,t,n,i,r,s,o,a){this.uri=e,this.initialUndoRedoSnapshot=t,this.time=n,this.sharesUndoRedoStack=i,this.heapSize=r,this.sha1=s,this.versionId=o,this.alternativeVersionId=a}}let gr=class extends r.jG{static{ir=this}static{this.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK=20971520}constructor(e,t,n,r){super(),this._configurationService=e,this._resourcePropertiesService=t,this._undoRedoService=n,this._instantiationService=r,this._onModelAdded=this._register(new i.vl),this.onModelAdded=this._onModelAdded.event,this._onModelRemoved=this._register(new i.vl),this.onModelRemoved=this._onModelRemoved.event,this._onModelModeChanged=this._register(new i.vl),this.onModelLanguageChanged=this._onModelModeChanged.event,this._modelCreationOptionsByLanguageAndResource=Object.create(null),this._models={},this._disposedModels=new Map,this._disposedModelsHeapSize=0,this._register(this._configurationService.onDidChangeConfiguration((e=>this._updateModelOptions(e)))),this._updateModelOptions(void 0)}static _readModelOptions(e,t){let n=p.tabSize;if(e.editor&&void 0!==e.editor.tabSize){const t=parseInt(e.editor.tabSize,10);isNaN(t)||(n=t),n<1&&(n=1)}let i="tabSize";if(e.editor&&void 0!==e.editor.indentSize&&"tabSize"!==e.editor.indentSize){const t=parseInt(e.editor.indentSize,10);isNaN(t)||(i=Math.max(t,1))}let r=p.insertSpaces;e.editor&&void 0!==e.editor.insertSpaces&&(r="false"!==e.editor.insertSpaces&&Boolean(e.editor.insertSpaces));let s=cr;const o=e.eol;"\r\n"===o?s=2:"\n"===o&&(s=1);let a=p.trimAutoWhitespace;e.editor&&void 0!==e.editor.trimAutoWhitespace&&(a="false"!==e.editor.trimAutoWhitespace&&Boolean(e.editor.trimAutoWhitespace));let l=p.detectIndentation;e.editor&&void 0!==e.editor.detectIndentation&&(l="false"!==e.editor.detectIndentation&&Boolean(e.editor.detectIndentation));let h=p.largeFileOptimizations;e.editor&&void 0!==e.editor.largeFileOptimizations&&(h="false"!==e.editor.largeFileOptimizations&&Boolean(e.editor.largeFileOptimizations));let u=p.bracketPairColorizationOptions;return e.editor?.bracketPairColorization&&"object"==typeof e.editor.bracketPairColorization&&(u={enabled:!!e.editor.bracketPairColorization.enabled,independentColorPoolPerBracketType:!!e.editor.bracketPairColorization.independentColorPoolPerBracketType}),{isForSimpleWidget:t,tabSize:n,indentSize:i,insertSpaces:r,detectIndentation:l,defaultEOL:s,trimAutoWhitespace:a,largeFileOptimizations:h,bracketPairColorizationOptions:u}}_getEOL(e,t){if(e)return this._resourcePropertiesService.getEOL(e,t);const n=this._configurationService.getValue("files.eol",{overrideIdentifier:t});return n&&"string"==typeof n&&"auto"!==n?n:3===s.OS||2===s.OS?"\n":"\r\n"}_shouldRestoreUndoStack(){const e=this._configurationService.getValue("files.restoreUndoStack");return"boolean"!=typeof e||e}getCreationOptions(e,t,n){const i="string"==typeof e?e:e.languageId;let r=this._modelCreationOptionsByLanguageAndResource[i+t];if(!r){const e=this._configurationService.getValue("editor",{overrideIdentifier:i,resource:t}),s=this._getEOL(t,i);r=ir._readModelOptions({editor:e,eol:s},n),this._modelCreationOptionsByLanguageAndResource[i+t]=r}return r}_updateModelOptions(e){const t=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);const n=Object.keys(this._models);for(let i=0,r=n.length;i<r;i++){const r=n[i],s=this._models[r],o=s.model.getLanguageId(),a=s.model.uri;if(e&&!e.affectsConfiguration("editor",{overrideIdentifier:o,resource:a})&&!e.affectsConfiguration("files.eol",{overrideIdentifier:o,resource:a}))continue;const l=t[o+a],h=this.getCreationOptions(o,a,s.model.isForSimpleWidget);ir._setModelOptionsForModel(s.model,h,l)}}static _setModelOptionsForModel(e,t,n){n&&n.defaultEOL!==t.defaultEOL&&1===e.getLineCount()&&e.setEOL(1===t.defaultEOL?0:1),n&&n.detectIndentation===t.detectIndentation&&n.insertSpaces===t.insertSpaces&&n.tabSize===t.tabSize&&n.indentSize===t.indentSize&&n.trimAutoWhitespace===t.trimAutoWhitespace&&(0,ar.aI)(n.bracketPairColorizationOptions,t.bracketPairColorizationOptions)||(t.detectIndentation?(e.detectIndentation(t.insertSpaces,t.tabSize),e.updateOptions({trimAutoWhitespace:t.trimAutoWhitespace,bracketColorizationOptions:t.bracketPairColorizationOptions})):e.updateOptions({insertSpaces:t.insertSpaces,tabSize:t.tabSize,indentSize:t.indentSize,trimAutoWhitespace:t.trimAutoWhitespace,bracketColorizationOptions:t.bracketPairColorizationOptions}))}_insertDisposedModel(e){this._disposedModels.set(hr(e.uri),e),this._disposedModelsHeapSize+=e.heapSize}_removeDisposedModel(e){const t=this._disposedModels.get(hr(e));return t&&(this._disposedModelsHeapSize-=t.heapSize),this._disposedModels.delete(hr(e)),t}_ensureDisposedModelsHeapSize(e){if(this._disposedModelsHeapSize>e){const t=[];for(this._disposedModels.forEach((e=>{e.sharesUndoRedoStack||t.push(e)})),t.sort(((e,t)=>e.time-t.time));t.length>0&&this._disposedModelsHeapSize>e;){const e=t.shift();this._removeDisposedModel(e.uri),null!==e.initialUndoRedoSnapshot&&this._undoRedoService.restoreSnapshot(e.initialUndoRedoSnapshot)}}}_createModelData(e,t,n,i){const r=this.getCreationOptions(t,n,i),s=this._instantiationService.createInstance(Wi,e,t,r,n);if(n&&this._disposedModels.has(hr(n))){const e=this._removeDisposedModel(n),t=this._undoRedoService.getElements(n),i=this._getSHA1Computer(),r=!!i.canComputeSHA1(s)&&i.computeSHA1(s)===e.sha1;if(r||e.sharesUndoRedoStack){for(const e of t.past)Bt(e)&&e.matchesResource(n)&&e.setModel(s);for(const e of t.future)Bt(e)&&e.matchesResource(n)&&e.setModel(s);this._undoRedoService.setElementsValidFlag(n,!0,(e=>Bt(e)&&e.matchesResource(n))),r&&(s._overwriteVersionId(e.versionId),s._overwriteAlternativeVersionId(e.alternativeVersionId),s._overwriteInitialUndoRedoSnapshot(e.initialUndoRedoSnapshot))}else null!==e.initialUndoRedoSnapshot&&this._undoRedoService.restoreSnapshot(e.initialUndoRedoSnapshot)}const o=hr(s.uri);if(this._models[o])throw new Error("ModelService: Cannot add model because it already exists!");const a=new ur(s,(e=>this._onWillDispose(e)),((e,t)=>this._onDidChangeLanguage(e,t)));return this._models[o]=a,a}createModel(e,t,n,i=!1){let r;return r=t?this._createModelData(e,t,n,i):this._createModelData(e,j.vH,n,i),this._onModelAdded.fire(r.model),r.model}getModels(){const e=[],t=Object.keys(this._models);for(let n=0,i=t.length;n<i;n++){const i=t[n];e.push(this._models[i].model)}return e}getModel(e){const t=hr(e),n=this._models[t];return n?n.model:null}_schemaShouldMaintainUndoRedoElements(e){return e.scheme===or.ny.file||e.scheme===or.ny.vscodeRemote||e.scheme===or.ny.vscodeUserData||e.scheme===or.ny.vscodeNotebookCell||"fake-fs"===e.scheme}_onWillDispose(e){const t=hr(e.uri),n=this._models[t],i=this._undoRedoService.getUriComparisonKey(e.uri)!==e.uri.toString();let r=!1,s=0;if(i||this._shouldRestoreUndoStack()&&this._schemaShouldMaintainUndoRedoElements(e.uri)){const t=this._undoRedoService.getElements(e.uri);if(t.past.length>0||t.future.length>0){for(const n of t.past)Bt(n)&&n.matchesResource(e.uri)&&(r=!0,s+=n.heapSize(e.uri),n.setModel(e.uri));for(const n of t.future)Bt(n)&&n.matchesResource(e.uri)&&(r=!0,s+=n.heapSize(e.uri),n.setModel(e.uri))}}const o=ir.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK,a=this._getSHA1Computer();if(r)if(i||!(s>o)&&a.canComputeSHA1(e))this._ensureDisposedModelsHeapSize(o-s),this._undoRedoService.setElementsValidFlag(e.uri,!1,(t=>Bt(t)&&t.matchesResource(e.uri))),this._insertDisposedModel(new dr(e.uri,n.model.getInitialUndoRedoSnapshot(),Date.now(),i,s,a.computeSHA1(e),e.getVersionId(),e.getAlternativeVersionId()));else{const e=n.model.getInitialUndoRedoSnapshot();null!==e&&this._undoRedoService.restoreSnapshot(e)}else if(!i){const e=n.model.getInitialUndoRedoSnapshot();null!==e&&this._undoRedoService.restoreSnapshot(e)}delete this._models[t],n.dispose(),delete this._modelCreationOptionsByLanguageAndResource[e.getLanguageId()+e.uri],this._onModelRemoved.fire(e)}_onDidChangeLanguage(e,t){const n=t.oldLanguage,i=e.getLanguageId(),r=this.getCreationOptions(n,e.uri,e.isForSimpleWidget),s=this.getCreationOptions(i,e.uri,e.isForSimpleWidget);ir._setModelOptionsForModel(e,s,r),this._onModelModeChanged.fire({model:e,oldLanguageId:n})}_getSHA1Computer(){return new fr}};gr=ir=function(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([lr(0,U.pG),lr(1,rr.ITextResourcePropertiesService),lr(2,Mi),lr(3,H._Y)],gr);class fr{static{this.MAX_MODEL_SIZE=10485760}canComputeSHA1(e){return e.getValueLength()<=fr.MAX_MODEL_SIZE}computeSHA1(e){const t=new sr.v7,n=e.createSnapshot();let i;for(;i=n.read();)t.update(i);return t.digest()}}},7042:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ITextModelService:()=>i});const i=(0,n(2399).u1)("textModelService")},9376:(e,t,n)=>{"use strict";n.r(t),n.d(t,{encodeSemanticTokensDto:()=>s});var i=n(2802),r=n(3339);function s(e){const t=new Uint32Array(function(e){let t=0;if(t+=2,"full"===e.type)t+=1+e.data.length;else{t+=1,t+=3*e.deltas.length;for(const n of e.deltas)n.data&&(t+=n.data.length)}return t}(e));let n=0;if(t[n++]=e.id,"full"===e.type)t[n++]=1,t[n++]=e.data.length,t.set(e.data,n),n+=e.data.length;else{t[n++]=2,t[n++]=e.deltas.length;for(const i of e.deltas)t[n++]=i.start,t[n++]=i.deleteCount,i.data?(t[n++]=i.data.length,t.set(i.data,n),n+=i.data.length):t[n++]=0}return function(e){const t=new Uint8Array(e.buffer,e.byteOffset,4*e.length);return r.cm()||function(e){for(let t=0,n=e.length;t<n;t+=4){const n=e[t+0],i=e[t+1],r=e[t+2],s=e[t+3];e[t+0]=s,e[t+1]=r,e[t+2]=i,e[t+3]=n}}(t),i.MB.wrap(t)}(t)}},9520:(e,t,n)=>{"use strict";n.r(t),n.d(t,{SemanticTokensProviderStyling:()=>g,toMultilineTokens2:()=>f}),n(5910);var i=n(5295),r=n(9950),s=n(5365),o=n(8061),a=n(3902);class l{static create(e,t){return new l(e,new h(t))}get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._endLineNumber}constructor(e,t){this._startLineNumber=e,this._tokens=t,this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}toString(){return this._tokens.toString(this._startLineNumber)}_updateEndLineNumber(){this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}isEmpty(){return this._tokens.isEmpty()}getLineTokens(e){return this._startLineNumber<=e&&e<=this._endLineNumber?this._tokens.getLineTokens(e-this._startLineNumber):null}getRange(){const e=this._tokens.getRange();return e?new o.Q(this._startLineNumber+e.startLineNumber,e.startColumn,this._startLineNumber+e.endLineNumber,e.endColumn):e}removeTokens(e){const t=e.startLineNumber-this._startLineNumber,n=e.endLineNumber-this._startLineNumber;this._startLineNumber+=this._tokens.removeTokens(t,e.startColumn-1,n,e.endColumn-1),this._updateEndLineNumber()}split(e){const t=e.startLineNumber-this._startLineNumber,n=e.endLineNumber-this._startLineNumber,[i,r,s]=this._tokens.split(t,e.startColumn-1,n,e.endColumn-1);return[new l(this._startLineNumber,i),new l(this._startLineNumber+s,r)]}applyEdit(e,t){const[n,i,r]=(0,a.W)(t);this.acceptEdit(e,n,i,r,t.length>0?t.charCodeAt(0):0)}acceptEdit(e,t,n,i,r){this._acceptDeleteRange(e),this._acceptInsertText(new s.y(e.startLineNumber,e.startColumn),t,n,i,r),this._updateEndLineNumber()}_acceptDeleteRange(e){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return;const t=e.startLineNumber-this._startLineNumber,n=e.endLineNumber-this._startLineNumber;if(n<0){const e=n-t;return void(this._startLineNumber-=e)}const i=this._tokens.getMaxDeltaLine();if(!(t>=i+1)){if(t<0&&n>=i+1)return this._startLineNumber=0,void this._tokens.clear();if(t<0){const i=-t;this._startLineNumber-=i,this._tokens.acceptDeleteRange(e.startColumn-1,0,0,n,e.endColumn-1)}else this._tokens.acceptDeleteRange(0,t,e.startColumn-1,n,e.endColumn-1)}}_acceptInsertText(e,t,n,i,r){if(0===t&&0===n)return;const s=e.lineNumber-this._startLineNumber;s<0?this._startLineNumber+=t:s>=this._tokens.getMaxDeltaLine()+1||this._tokens.acceptInsertText(s,e.column-1,t,n,i,r)}}class h{constructor(e){this._tokens=e,this._tokenCount=e.length/4}toString(e){const t=[];for(let n=0;n<this._tokenCount;n++)t.push(`(${this._getDeltaLine(n)+e},${this._getStartCharacter(n)}-${this._getEndCharacter(n)})`);return`[${t.join(",")}]`}getMaxDeltaLine(){const e=this._getTokenCount();return 0===e?-1:this._getDeltaLine(e-1)}getRange(){const e=this._getTokenCount();if(0===e)return null;const t=this._getStartCharacter(0),n=this._getDeltaLine(e-1),i=this._getEndCharacter(e-1);return new o.Q(0,t+1,n,i+1)}_getTokenCount(){return this._tokenCount}_getDeltaLine(e){return this._tokens[4*e]}_getStartCharacter(e){return this._tokens[4*e+1]}_getEndCharacter(e){return this._tokens[4*e+2]}isEmpty(){return 0===this._getTokenCount()}getLineTokens(e){let t=0,n=this._getTokenCount()-1;for(;t<n;){const i=t+Math.floor((n-t)/2),r=this._getDeltaLine(i);if(r<e)t=i+1;else{if(!(r>e)){let r=i;for(;r>t&&this._getDeltaLine(r-1)===e;)r--;let s=i;for(;s<n&&this._getDeltaLine(s+1)===e;)s++;return new u(this._tokens.subarray(4*r,4*s+4))}n=i-1}}return this._getDeltaLine(t)===e?new u(this._tokens.subarray(4*t,4*t+4)):null}clear(){this._tokenCount=0}removeTokens(e,t,n,i){const r=this._tokens,s=this._tokenCount;let o=0,a=!1,l=0;for(let h=0;h<s;h++){const s=4*h,u=r[s],c=r[s+1],d=r[s+2],g=r[s+3];if((u>e||u===e&&d>=t)&&(u<n||u===n&&c<=i))a=!0;else{if(0===o&&(l=u),a){const e=4*o;r[e]=u-l,r[e+1]=c,r[e+2]=d,r[e+3]=g}o++}}return this._tokenCount=o,l}split(e,t,n,i){const r=this._tokens,s=this._tokenCount,o=[],a=[];let l=o,u=0,c=0;for(let o=0;o<s;o++){const s=4*o,h=r[s],d=r[s+1],g=r[s+2],f=r[s+3];if(h>e||h===e&&g>=t){if(h<n||h===n&&d<=i)continue;l!==a&&(l=a,u=0,c=h)}l[u++]=h-c,l[u++]=d,l[u++]=g,l[u++]=f}return[new h(new Uint32Array(o)),new h(new Uint32Array(a)),c]}acceptDeleteRange(e,t,n,i,r){const s=this._tokens,o=this._tokenCount,a=i-t;let l=0,h=!1;for(let u=0;u<o;u++){const c=4*u;let d=s[c],g=s[c+1],f=s[c+2];const m=s[c+3];if(d<t||d===t&&f<=n){l++;continue}if(d===t&&g<n)d===i&&f>r?f-=r-n:f=n;else if(d===t&&g===n){if(!(d===i&&f>r)){h=!0;continue}f-=r-n}else if(d<i||d===i&&g<r){if(!(d===i&&f>r)){h=!0;continue}d=t,g=n,f=g+(f-r)}else if(d>i){if(0===a&&!h){l=o;break}d-=a}else{if(!(d===i&&g>=r))throw new Error("Not possible!");e&&0===d&&(g+=e,f+=e),d-=a,g-=r-n,f-=r-n}const p=4*l;s[p]=d,s[p+1]=g,s[p+2]=f,s[p+3]=m,l++}this._tokenCount=l}acceptInsertText(e,t,n,i,r,s){const o=0===n&&1===i&&(s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122),a=this._tokens,l=this._tokenCount;for(let s=0;s<l;s++){const l=4*s;let h=a[l],u=a[l+1],c=a[l+2];if(!(h<e||h===e&&c<t)){if(h===e&&c===t){if(!o)continue;c+=1}else if(h===e&&u<t&&t<c)0===n?c+=i:c=t;else{if(h===e&&u===t&&o)continue;if(h===e)if(h+=n,0===n)u+=i,c+=i;else{const e=c-u;u=r+(u-t),c=u+e}else h+=n}a[l]=h,a[l+1]=u,a[l+2]=c}}}}class u{constructor(e){this._tokens=e}getCount(){return this._tokens.length/4}getStartCharacter(e){return this._tokens[4*e+1]}getEndCharacter(e){return this._tokens[4*e+2]}getMetadata(e){return this._tokens[4*e+3]}}var c=n(7922),d=function(e,t){return function(n,i){t(n,i,e)}};let g=class{constructor(e,t,n,i){this._legend=e,this._themeService=t,this._languageService=n,this._logService=i,this._hasWarnedOverlappingTokens=!1,this._hasWarnedInvalidLengthTokens=!1,this._hasWarnedInvalidEditStart=!1,this._hashTable=new p}getMetadata(e,t,n){const i=this._languageService.languageIdCodec.encodeLanguageId(n),r=this._hashTable.get(e,t,i);let s;if(r)s=r.metadata;else{let r=this._legend.tokenTypes[e];const o=[];if(r){let e=t;for(let t=0;e>0&&t<this._legend.tokenModifiers.length;t++)1&e&&o.push(this._legend.tokenModifiers[t]),e>>=1;const i=this._themeService.getColorTheme().getTokenStyleMetadata(r,o,n);void 0===i?s=2147483647:(s=0,void 0!==i.italic&&(s|=1|(i.italic?1:0)<<11),void 0!==i.bold&&(s|=2|(i.bold?2:0)<<11),void 0!==i.underline&&(s|=4|(i.underline?4:0)<<11),void 0!==i.strikethrough&&(s|=8|(i.strikethrough?8:0)<<11),i.foreground&&(s|=16|i.foreground<<15),0===s&&(s=2147483647))}else s=2147483647,r="not-in-legend";this._hashTable.add(e,t,i,s)}return s}warnOverlappingSemanticTokens(e,t){this._hasWarnedOverlappingTokens||(this._hasWarnedOverlappingTokens=!0,this._logService.warn(`Overlapping semantic tokens detected at lineNumber ${e}, column ${t}`))}warnInvalidLengthSemanticTokens(e,t){this._hasWarnedInvalidLengthTokens||(this._hasWarnedInvalidLengthTokens=!0,this._logService.warn(`Semantic token with invalid length detected at lineNumber ${e}, column ${t}`))}warnInvalidEditStart(e,t,n,i,r){this._hasWarnedInvalidEditStart||(this._hasWarnedInvalidEditStart=!0,this._logService.warn(`Invalid semantic tokens edit detected (previousResultId: ${e}, resultId: ${t}) at edit #${n}: The provided start offset ${i} is outside the previous data (length ${r}).`))}};function f(e,t,n){const i=e.data,r=e.data.length/5|0,s=Math.max(Math.ceil(r/1024),400),o=[];let a=0,h=1,u=0;for(;a<r;){const e=a;let c=Math.min(e+s,r);if(c<r){let t=c;for(;t-1>e&&0===i[5*t];)t--;if(t-1===e){let e=c;for(;e+1<r&&0===i[5*e];)e++;c=e}else c=t}let d=new Uint32Array(4*(c-e)),g=0,f=0,m=0,p=0;for(;a<c;){const e=5*a,r=i[e],s=i[e+1],o=h+r|0,l=0===r?u+s|0:s,c=l+i[e+2]|0,_=i[e+3],b=i[e+4];if(c<=l)t.warnInvalidLengthSemanticTokens(o,l+1);else if(m===o&&p>l)t.warnOverlappingSemanticTokens(o,l+1);else{const e=t.getMetadata(_,b,n);2147483647!==e&&(0===f&&(f=o),d[g]=o-f,d[g+1]=l,d[g+2]=c,d[g+3]=e,g+=4,m=o,p=c)}h=o,u=l,a++}g!==d.length&&(d=d.subarray(0,g));const _=l.create(f,d);o.push(_)}return o}g=function(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([d(1,i.Gy),d(2,c.L),d(3,r.rr)],g);class m{constructor(e,t,n,i){this.tokenTypeIndex=e,this.tokenModifierSet=t,this.languageId=n,this.metadata=i,this.next=null}}class p{static{this._SIZES=[3,7,13,31,61,127,251,509,1021,2039,4093,8191,16381,32749,65521,131071,262139,524287,1048573,2097143]}constructor(){this._elementsCount=0,this._currentLengthIndex=0,this._currentLength=p._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1<p._SIZES.length?2/3*this._currentLength:0),this._elements=[],p._nullOutEntries(this._elements,this._currentLength)}static _nullOutEntries(e,t){for(let n=0;n<t;n++)e[n]=null}_hash2(e,t){return(e<<5)-e+t|0}_hashFunc(e,t,n){return this._hash2(this._hash2(e,t),n)%this._currentLength}get(e,t,n){const i=this._hashFunc(e,t,n);let r=this._elements[i];for(;r;){if(r.tokenTypeIndex===e&&r.tokenModifierSet===t&&r.languageId===n)return r;r=r.next}return null}add(e,t,n,i){if(this._elementsCount++,0!==this._growCount&&this._elementsCount>=this._growCount){const e=this._elements;this._currentLengthIndex++,this._currentLength=p._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1<p._SIZES.length?2/3*this._currentLength:0),this._elements=[],p._nullOutEntries(this._elements,this._currentLength);for(const t of e){let e=t;for(;e;){const t=e.next;e.next=null,this._add(e),e=t}}}this._add(new m(e,t,n,i))}_add(e){const t=this._hashFunc(e.tokenTypeIndex,e.tokenModifierSet,e.languageId);e.next=this._elements[t],this._elements[t]=e}}},2891:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ISemanticTokensStylingService:()=>i});const i=(0,n(2399).u1)("semanticTokensStylingService")},8148:(e,t,n)=>{"use strict";n.r(t),n.d(t,{SemanticTokensStylingService:()=>c});var i=n(9235),r=n(7922),s=n(5295),o=n(9950),a=n(9520),l=n(2891),h=n(9031),u=function(e,t){return function(n,i){t(n,i,e)}};let c=class extends i.jG{constructor(e,t,n){super(),this._themeService=e,this._logService=t,this._languageService=n,this._caches=new WeakMap,this._register(this._themeService.onDidColorThemeChange((()=>{this._caches=new WeakMap})))}getStyling(e){return this._caches.has(e)||this._caches.set(e,new a.SemanticTokensProviderStyling(e.getLegend(),this._themeService,this._languageService,this._logService)),this._caches.get(e)}};c=function(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([u(0,s.Gy),u(1,o.rr),u(2,r.L)],c),(0,h.v)(l.ISemanticTokensStylingService,c,1)},1305:(e,t,n)=>{"use strict";n.r(t),n.d(t,{MirrorModel:()=>_,STOP_SYNC_MODEL_DELTA_TIME_MS:()=>f,WorkerTextModelSyncClient:()=>m,WorkerTextModelSyncServer:()=>p});var i=n(1946),r=n(9235),s=n(7264),o=n(5365),a=n(8061),l=n(8782),h=n(6844),u=(n(3338),n(7512));class c{constructor(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(e,t){e=(0,u.j)(e);const n=this.values,i=this.prefixSum,r=t.length;return 0!==r&&(this.values=new Uint32Array(n.length+r),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e),e+r),this.values.set(t,e),e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),this.prefixSum=new Uint32Array(this.values.length),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(e,t){return e=(0,u.j)(e),t=(0,u.j)(t),this.values[e]!==t&&(this.values[e]=t,e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),!0)}removeValues(e,t){e=(0,u.j)(e),t=(0,u.j)(t);const n=this.values,i=this.prefixSum;if(e>=n.length)return!1;const r=n.length-e;return t>=r&&(t=r),0!==t&&(this.values=new Uint32Array(n.length-t),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e+t),e),this.prefixSum=new Uint32Array(this.values.length),e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return 0===this.values.length?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(e){return e<0?0:(e=(0,u.j)(e),this._getPrefixSum(e))}_getPrefixSum(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];let t=this.prefixSumValidIndex[0]+1;0===t&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);for(let n=t;n<=e;n++)this.prefixSum[n]=this.prefixSum[n-1]+this.values[n];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]}getIndexOf(e){e=Math.floor(e),this.getTotalSum();let t=0,n=this.values.length-1,i=0,r=0,s=0;for(;t<=n;)if(i=t+(n-t)/2|0,r=this.prefixSum[i],s=r-this.values[i],e<s)n=i-1;else{if(!(e>=r))break;t=i+1}return new d(i,e-s)}}class d{constructor(e,t){this.index=e,this.remainder=t,this._prefixSumIndexOfResultBrand=void 0,this.index=e,this.remainder=t}}class g{constructor(e,t,n,i){this._uri=e,this._lines=t,this._eol=n,this._versionId=i,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return null===this._cachedTextValue&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(e){e.eol&&e.eol!==this._eol&&(this._eol=e.eol,this._lineStarts=null);const t=e.changes;for(const e of t)this._acceptDeleteRange(e.range),this._acceptInsertText(new o.y(e.range.startLineNumber,e.range.startColumn),e.text);this._versionId=e.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){const e=this._eol.length,t=this._lines.length,n=new Uint32Array(t);for(let i=0;i<t;i++)n[i]=this._lines[i].length+e;this._lineStarts=new c(n)}}_setLineText(e,t){this._lines[e]=t,this._lineStarts&&this._lineStarts.setValue(e,this._lines[e].length+this._eol.length)}_acceptDeleteRange(e){if(e.startLineNumber!==e.endLineNumber)this._setLineText(e.startLineNumber-1,this._lines[e.startLineNumber-1].substring(0,e.startColumn-1)+this._lines[e.endLineNumber-1].substring(e.endColumn-1)),this._lines.splice(e.startLineNumber,e.endLineNumber-e.startLineNumber),this._lineStarts&&this._lineStarts.removeValues(e.startLineNumber,e.endLineNumber-e.startLineNumber);else{if(e.startColumn===e.endColumn)return;this._setLineText(e.startLineNumber-1,this._lines[e.startLineNumber-1].substring(0,e.startColumn-1)+this._lines[e.startLineNumber-1].substring(e.endColumn-1))}}_acceptInsertText(e,t){if(0===t.length)return;const n=(0,h.uz)(t);if(1===n.length)return void this._setLineText(e.lineNumber-1,this._lines[e.lineNumber-1].substring(0,e.column-1)+n[0]+this._lines[e.lineNumber-1].substring(e.column-1));n[n.length-1]+=this._lines[e.lineNumber-1].substring(e.column-1),this._setLineText(e.lineNumber-1,this._lines[e.lineNumber-1].substring(0,e.column-1)+n[0]);const i=new Uint32Array(n.length-1);for(let t=1;t<n.length;t++)this._lines.splice(e.lineNumber+t-1,0,n[t]),i[t-1]=n[t].length+this._eol.length;this._lineStarts&&this._lineStarts.insertValues(e.lineNumber,i)}}const f=6e4;class m extends r.jG{constructor(e,t,n=!1){if(super(),this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),this._proxy=e,this._modelService=t,!n){const e=new i.vb;e.cancelAndSet((()=>this._checkStopModelSync()),Math.round(f/2)),this._register(e)}}dispose(){for(const e in this._syncedModels)(0,r.AS)(this._syncedModels[e]);this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),super.dispose()}ensureSyncedResources(e,t=!1){for(const n of e){const e=n.toString();this._syncedModels[e]||this._beginModelSync(n,t),this._syncedModels[e]&&(this._syncedModelsLastUsedTime[e]=(new Date).getTime())}}_checkStopModelSync(){const e=(new Date).getTime(),t=[];for(const n in this._syncedModelsLastUsedTime)e-this._syncedModelsLastUsedTime[n]>f&&t.push(n);for(const e of t)this._stopModelSync(e)}_beginModelSync(e,t){const n=this._modelService.getModel(e);if(!n)return;if(!t&&n.isTooLargeForSyncing())return;const i=e.toString();this._proxy.$acceptNewModel({url:n.uri.toString(),lines:n.getLinesContent(),EOL:n.getEOL(),versionId:n.getVersionId()});const s=new r.Cm;s.add(n.onDidChangeContent((e=>{this._proxy.$acceptModelChanged(i.toString(),e)}))),s.add(n.onWillDispose((()=>{this._stopModelSync(i)}))),s.add((0,r.s)((()=>{this._proxy.$acceptRemovedModel(i)}))),this._syncedModels[i]=s}_stopModelSync(e){const t=this._syncedModels[e];delete this._syncedModels[e],delete this._syncedModelsLastUsedTime[e],(0,r.AS)(t)}}class p{constructor(){this._models=Object.create(null)}getModel(e){return this._models[e]}getModels(){const e=[];return Object.keys(this._models).forEach((t=>e.push(this._models[t]))),e}$acceptNewModel(e){this._models[e.url]=new _(s.r.parse(e.url),e.lines,e.EOL,e.versionId)}$acceptModelChanged(e,t){this._models[e]&&this._models[e].onEvents(t)}$acceptRemovedModel(e){this._models[e]&&delete this._models[e]}}class _ extends g{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}findMatches(e){const t=[];for(let n=0;n<this._lines.length;n++){const i=this._lines[n],r=this.offsetAt(new o.y(n+1,1)),s=i.matchAll(e);for(const e of s)(e.index||0===e.index)&&(e.index=e.index+r),t.push(e)}return t}getLinesContent(){return this._lines.slice(0)}getLineCount(){return this._lines.length}getLineContent(e){return this._lines[e-1]}getWordAtPosition(e,t){const n=(0,l.Th)(e.column,(0,l.Io)(t),this._lines[e.lineNumber-1],0);return n?new a.Q(e.lineNumber,n.startColumn,e.lineNumber,n.endColumn):null}words(e){const t=this._lines,n=this._wordenize.bind(this);let i=0,r="",s=0,o=[];return{*[Symbol.iterator](){for(;;)if(s<o.length){const e=r.substring(o[s].start,o[s].end);s+=1,yield e}else{if(!(i<t.length))break;r=t[i],o=n(r,e),s=0,i+=1}}}}getLineWords(e,t){const n=this._lines[e-1],i=this._wordenize(n,t),r=[];for(const e of i)r.push({word:n.substring(e.start,e.end),startColumn:e.start+1,endColumn:e.end+1});return r}_wordenize(e,t){const n=[];let i;for(t.lastIndex=0;(i=t.exec(e))&&0!==i[0].length;)n.push({start:i.index,end:i.index+i[0].length});return n}getValueInRange(e){if((e=this._validateRange(e)).startLineNumber===e.endLineNumber)return this._lines[e.startLineNumber-1].substring(e.startColumn-1,e.endColumn-1);const t=this._eol,n=e.startLineNumber-1,i=e.endLineNumber-1,r=[];r.push(this._lines[n].substring(e.startColumn-1));for(let e=n+1;e<i;e++)r.push(this._lines[e]);return r.push(this._lines[i].substring(0,e.endColumn-1)),r.join(t)}offsetAt(e){return e=this._validatePosition(e),this._ensureLineStarts(),this._lineStarts.getPrefixSum(e.lineNumber-2)+(e.column-1)}positionAt(e){e=Math.floor(e),e=Math.max(0,e),this._ensureLineStarts();const t=this._lineStarts.getIndexOf(e),n=this._lines[t.index].length;return{lineNumber:1+t.index,column:1+Math.min(t.remainder,n)}}_validateRange(e){const t=this._validatePosition({lineNumber:e.startLineNumber,column:e.startColumn}),n=this._validatePosition({lineNumber:e.endLineNumber,column:e.endColumn});return t.lineNumber!==e.startLineNumber||t.column!==e.startColumn||n.lineNumber!==e.endLineNumber||n.column!==e.endColumn?{startLineNumber:t.lineNumber,startColumn:t.column,endLineNumber:n.lineNumber,endColumn:n.column}:e}_validatePosition(e){if(!o.y.isIPosition(e))throw new Error("bad position");let{lineNumber:t,column:n}=e,i=!1;if(t<1)t=1,n=1,i=!0;else if(t>this._lines.length)t=this._lines.length,n=this._lines[t-1].length+1,i=!0;else{const e=this._lines[t-1].length+1;n<1?(n=1,i=!0):n>e&&(n=e,i=!0)}return i?{lineNumber:t,column:n}:e}}},5628:(e,t,n)=>{"use strict";n.r(t)},1504:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ITextResourceConfigurationService:()=>r,ITextResourcePropertiesService:()=>s});var i=n(2399);const r=(0,i.u1)("textResourceConfigurationService"),s=(0,i.u1)("textResourcePropertiesService")},5320:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ITreeSitterParserService:()=>i});const i=(0,n(2399).u1)("treeSitterParserService")},2603:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DraggedTreeItemsIdentifier:()=>r,TreeViewsDnDService:()=>i});class i{constructor(){this._dragOperations=new Map}removeDragOperationTransfer(e){if(e&&this._dragOperations.has(e)){const t=this._dragOperations.get(e);return this._dragOperations.delete(e),t}}}class r{constructor(e){this.identifier=e}}},6756:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ITreeViewsDnDService:()=>o});var i=n(9031),r=n(2399),s=n(2603);const o=(0,r.u1)("treeViewsDndService");(0,i.v)(o,s.TreeViewsDnDService,1)},9887:(e,t,n)=>{"use strict";n.r(t),n.d(t,{UnicodeTextModelHighlighter:()=>l});var i=n(8061),r=n(2007),s=n(6844),o=n(7110),a=n(8782);class l{static computeUnicodeHighlights(e,t,n){const l=n?n.startLineNumber:1,u=n?n.endLineNumber:e.getLineCount(),c=new h(t),d=c.getCandidateCodePoints();let g;var f;g="allNonBasicAscii"===d?new RegExp("[^\\t\\n\\r\\x20-\\x7E]","g"):new RegExp((f=Array.from(d),`[${s.bm(f.map((e=>String.fromCodePoint(e))).join(""))}]`),"g");const m=new r.W5(null,g),p=[];let _,b=!1,k=0,C=0,v=0;e:for(let t=l,n=u;t<=n;t++){const n=e.getLineContent(t),r=n.length;m.reset(0);do{if(_=m.next(n),_){let e=_.index,l=_.index+_[0].length;if(e>0){const t=n.charCodeAt(e-1);s.pc(t)&&e--}if(l+1<r){const e=n.charCodeAt(l-1);s.pc(e)&&l++}const h=n.substring(e,l);let u=(0,a.Th)(e+1,a.Ld,n,0);u&&u.endColumn<=e+1&&(u=null);const d=c.shouldHighlightNonBasicASCII(h,u?u.word:null);if(0!==d){3===d?k++:2===d?C++:1===d?v++:(0,o.xb)(d);const n=1e3;if(p.length>=n){b=!0;break e}p.push(new i.Q(t,e+1,t,l+1))}}}while(_)}return{ranges:p,hasMore:b,ambiguousCharacterCount:k,invisibleCharacterCount:C,nonBasicAsciiCharacterCount:v}}static computeUnicodeHighlightReason(e,t){const n=new h(t);switch(n.shouldHighlightNonBasicASCII(e,null)){case 0:return null;case 2:return{kind:1};case 3:{const i=e.codePointAt(0),r=n.ambiguousCharacters.getPrimaryConfusable(i),o=s.tl.getLocales().filter((e=>!s.tl.getInstance(new Set([...t.allowedLocales,e])).isAmbiguous(i)));return{kind:0,confusableWith:String.fromCodePoint(r),notAmbiguousInLocales:o}}case 1:return{kind:2}}}}class h{constructor(e){this.options=e,this.allowedCodePoints=new Set(e.allowedCodePoints),this.ambiguousCharacters=s.tl.getInstance(new Set(e.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII)return"allNonBasicAscii";const e=new Set;if(this.options.invisibleCharacters)for(const t of s.y_.codePoints)u(String.fromCodePoint(t))||e.add(t);if(this.options.ambiguousCharacters)for(const t of this.ambiguousCharacters.getConfusableCodePoints())e.add(t);for(const t of this.allowedCodePoints)e.delete(t);return e}shouldHighlightNonBasicASCII(e,t){const n=e.codePointAt(0);if(this.allowedCodePoints.has(n))return 0;if(this.options.nonBasicASCII)return 1;let i=!1,r=!1;if(t)for(const e of t){const t=e.codePointAt(0),n=s.aC(e);i=i||n,n||this.ambiguousCharacters.isAmbiguous(t)||s.y_.isInvisibleCharacter(t)||(r=!0)}return!i&&r?0:this.options.invisibleCharacters&&!u(e)&&s.y_.isInvisibleCharacter(n)?2:this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(n)?3:0}}function u(e){return" "===e||"\n"===e||"\t"===e}},9204:(e,t,n)=>{var i={"./editorBaseApi":[4858],"./editorBaseApi.js":[4858],"./editorSimpleWorker":[7798],"./editorSimpleWorker.js":[7798],"./editorWorker":[304,792],"./editorWorker.js":[304,792],"./editorWorkerHost":[6358],"./editorWorkerHost.js":[6358],"./findSectionHeaders":[9307],"./findSectionHeaders.js":[9307],"./getIconClasses":[7762,792],"./getIconClasses.js":[7762,792],"./languageFeatureDebounce":[4791,792],"./languageFeatureDebounce.js":[4791,792],"./languageFeatures":[2230,792],"./languageFeatures.js":[2230,792],"./languageFeaturesService":[501,792],"./languageFeaturesService.js":[501,792],"./languageService":[6123,792],"./languageService.js":[6123,792],"./languagesAssociations":[5996,792],"./languagesAssociations.js":[5996,792],"./languagesRegistry":[6995,792],"./languagesRegistry.js":[6995,792],"./markerDecorations":[886,792],"./markerDecorations.js":[886,792],"./markerDecorationsService":[453,792],"./markerDecorationsService.js":[453,792],"./model":[4830,792],"./model.js":[4830,792],"./modelService":[125,792],"./modelService.js":[125,792],"./resolverService":[7042,792],"./resolverService.js":[7042,792],"./semanticTokensDto":[9376,792],"./semanticTokensDto.js":[9376,792],"./semanticTokensProviderStyling":[9520,792],"./semanticTokensProviderStyling.js":[9520,792],"./semanticTokensStyling":[2891,792],"./semanticTokensStyling.js":[2891,792],"./semanticTokensStylingService":[8148,792],"./semanticTokensStylingService.js":[8148,792],"./textModelSync/textModelSync.impl":[1305],"./textModelSync/textModelSync.impl.js":[1305],"./textModelSync/textModelSync.protocol":[5628,792],"./textModelSync/textModelSync.protocol.js":[5628,792],"./textResourceConfiguration":[1504,792],"./textResourceConfiguration.js":[1504,792],"./treeSitterParserService":[5320,792],"./treeSitterParserService.js":[5320,792],"./treeViewsDnd":[2603,792],"./treeViewsDnd.js":[2603,792],"./treeViewsDndService":[6756,792],"./treeViewsDndService.js":[6756,792],"./unicodeTextModelHighlighter":[9887],"./unicodeTextModelHighlighter.js":[9887]};function r(e){if(!n.o(i,e))return Promise.resolve().then((()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=i[e],r=t[0];return Promise.all(t.slice(1).map(n.e)).then((()=>n(r)))}r.keys=()=>Object.keys(i),r.id=9204,e.exports=r},7614:(e,t,n)=>{var i={"./editorBaseApi":4858,"./editorBaseApi.js":4858,"./editorSimpleWorker":7798,"./editorSimpleWorker.js":7798,"./editorWorker":304,"./editorWorker.js":304,"./editorWorkerHost":6358,"./editorWorkerHost.js":6358,"./findSectionHeaders":9307,"./findSectionHeaders.js":9307,"./getIconClasses":7762,"./getIconClasses.js":7762,"./languageFeatureDebounce":4791,"./languageFeatureDebounce.js":4791,"./languageFeatures":2230,"./languageFeatures.js":2230,"./languageFeaturesService":501,"./languageFeaturesService.js":501,"./languageService":6123,"./languageService.js":6123,"./languagesAssociations":5996,"./languagesAssociations.js":5996,"./languagesRegistry":6995,"./languagesRegistry.js":6995,"./markerDecorations":886,"./markerDecorations.js":886,"./markerDecorationsService":453,"./markerDecorationsService.js":453,"./model":4830,"./model.js":4830,"./modelService":125,"./modelService.js":125,"./resolverService":7042,"./resolverService.js":7042,"./semanticTokensDto":9376,"./semanticTokensDto.js":9376,"./semanticTokensProviderStyling":9520,"./semanticTokensProviderStyling.js":9520,"./semanticTokensStyling":2891,"./semanticTokensStyling.js":2891,"./semanticTokensStylingService":8148,"./semanticTokensStylingService.js":8148,"./textModelSync/textModelSync.impl":1305,"./textModelSync/textModelSync.impl.js":1305,"./textModelSync/textModelSync.protocol":5628,"./textModelSync/textModelSync.protocol.js":5628,"./textResourceConfiguration":1504,"./textResourceConfiguration.js":1504,"./treeSitterParserService":5320,"./treeSitterParserService.js":5320,"./treeViewsDnd":2603,"./treeViewsDnd.js":2603,"./treeViewsDndService":6756,"./treeViewsDndService.js":6756,"./unicodeTextModelHighlighter":9887,"./unicodeTextModelHighlighter.js":9887};function r(e){var t=s(e);return n(t)}function s(e){if(!n.o(i,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return i[e]}r.keys=function(){return Object.keys(i)},r.resolve=s,e.exports=r,r.id=7614},9746:(e,t,n)=>{"use strict";function i(){return globalThis._VSCODE_NLS_LANGUAGE}n.d(t,{i8:()=>i,kg:()=>s});const r="pseudo"===i()||"undefined"!=typeof document&&document.location&&document.location.hash.indexOf("pseudo=true")>=0;function s(e,t,...n){return function(e,t){let n;return n=0===t.length?e:e.replace(/\{(\d+)\}/g,((e,n)=>{const i=n[0],r=t[i];let s=e;return"string"==typeof r?s=r:"number"!=typeof r&&"boolean"!=typeof r&&null!=r||(s=String(r)),s})),r&&(n="［"+n.replace(/[aouei]/g,"$&$&")+"］"),n}("number"==typeof e?function(e,t){const n=globalThis._VSCODE_NLS_MESSAGES?.[e];if("string"!=typeof n){if("string"==typeof t)return t;throw new Error(`!!! NLS MISSING: ${e} !!!`)}return n}(e,t):t,n)}},5753:(e,t,n)=>{"use strict";n.d(t,{Mo:()=>r,pG:()=>i});const i=(0,n(2399).u1)("configurationService");function r(e){return e.replace(/[\[\]]/g,"")}},7142:(e,t,n)=>{"use strict";n.d(t,{Fd:()=>u});var i=n(3338),r=n(2106),s=n(9359),o=n(9746),a=n(5753),l=n(1460),h=n(7167);const u={Configuration:"base.contributions.configuration"},c={properties:{},patternProperties:{}},d={properties:{},patternProperties:{}},g={properties:{},patternProperties:{}},f={properties:{},patternProperties:{}},m={properties:{},patternProperties:{}},p={properties:{},patternProperties:{}},_="vscode://schemas/settings/resourceLanguage",b=h.O.as(l.F.JSONContribution),k="\\[([^\\]]+)\\]",C=new RegExp(k,"g"),v=`^(${k})+$`,L=new RegExp(v);function w(e){const t=[];if(L.test(e)){let n=C.exec(e);for(;n?.length;){const i=n[1].trim();i&&t.push(i),n=C.exec(e)}}return(0,i.dM)(t)}const y=new class{constructor(){this.registeredConfigurationDefaults=[],this.overrideIdentifiers=new Set,this._onDidSchemaChange=new r.vl,this._onDidUpdateConfiguration=new r.vl,this.configurationDefaultsOverrides=new Map,this.defaultLanguageConfigurationOverridesNode={id:"defaultOverrides",title:o.kg("defaultLanguageConfigurationOverrides.title","Default Language Configuration Overrides"),properties:{}},this.configurationContributors=[this.defaultLanguageConfigurationOverridesNode],this.resourceLanguageSettingsSchema={properties:{},patternProperties:{},additionalProperties:!0,allowTrailingCommas:!0,allowComments:!0},this.configurationProperties={},this.policyConfigurations=new Map,this.excludedConfigurationProperties={},b.registerSchema(_,this.resourceLanguageSettingsSchema),this.registerOverridePropertyPatternKey()}registerConfiguration(e,t=!0){this.registerConfigurations([e],t)}registerConfigurations(e,t=!0){const n=new Set;this.doRegisterConfigurations(e,t,n),b.registerSchema(_,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:n})}registerDefaultConfigurations(e){const t=new Set;this.doRegisterDefaultConfigurations(e,t),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:t,defaultsOverrides:!0})}doRegisterDefaultConfigurations(e,t){this.registeredConfigurationDefaults.push(...e);const n=[];for(const{overrides:i,source:r}of e)for(const e in i){t.add(e);const s=this.configurationDefaultsOverrides.get(e)??this.configurationDefaultsOverrides.set(e,{configurationDefaultOverrides:[]}).get(e),o=i[e];if(s.configurationDefaultOverrides.push({value:o,source:r}),L.test(e)){const t=this.mergeDefaultConfigurationsForOverrideIdentifier(e,o,r,s.configurationDefaultOverrideValue);if(!t)continue;s.configurationDefaultOverrideValue=t,this.updateDefaultOverrideProperty(e,t,r),n.push(...w(e))}else{const t=this.mergeDefaultConfigurationsForConfigurationProperty(e,o,r,s.configurationDefaultOverrideValue);if(!t)continue;s.configurationDefaultOverrideValue=t;const n=this.configurationProperties[e];n&&(this.updatePropertyDefaultValue(e,n),this.updateSchema(e,n))}}this.doRegisterOverrideIdentifiers(n)}updateDefaultOverrideProperty(e,t,n){const i={type:"object",default:t.value,description:o.kg("defaultLanguageConfiguration.description","Configure settings to be overridden for the {0} language.",(0,a.Mo)(e)),$ref:_,defaultDefaultValue:t.value,source:n,defaultValueSource:n};this.configurationProperties[e]=i,this.defaultLanguageConfigurationOverridesNode.properties[e]=i}mergeDefaultConfigurationsForOverrideIdentifier(e,t,n,i){const r=i?.value||{},o=i?.source??new Map;if(o instanceof Map){for(const e of Object.keys(t)){const i=t[e];if(s.Gv(i)&&(s.b0(r[e])||s.Gv(r[e]))){if(r[e]={...r[e]??{},...i},n)for(const t in i)o.set(`${e}.${t}`,n)}else r[e]=i,n?o.set(e,n):o.delete(e)}return{value:r,source:o}}console.error("objectConfigurationSources is not a Map")}mergeDefaultConfigurationsForConfigurationProperty(e,t,n,i){const r=this.configurationProperties[e],o=i?.value??r?.defaultDefaultValue;let a=n;if(s.Gv(t)&&(void 0!==r&&"object"===r.type||void 0===r&&(s.b0(o)||s.Gv(o)))){if(a=i?.source??new Map,!(a instanceof Map))return void console.error("defaultValueSource is not a Map");for(const i in t)n&&a.set(`${e}.${i}`,n);t={...s.Gv(o)?o:{},...t}}return{value:t,source:a}}registerOverrideIdentifiers(e){this.doRegisterOverrideIdentifiers(e),this._onDidSchemaChange.fire()}doRegisterOverrideIdentifiers(e){for(const t of e)this.overrideIdentifiers.add(t);this.updateOverridePropertyPatternKey()}doRegisterConfigurations(e,t,n){e.forEach((e=>{this.validateAndRegisterProperties(e,t,e.extensionInfo,e.restrictedProperties,void 0,n),this.configurationContributors.push(e),this.registerJSONConfiguration(e)}))}validateAndRegisterProperties(e,t=!0,n,i,r=3,o){r=s.z(e.scope)?r:e.scope;const a=e.properties;if(a)for(const e in a){const l=a[e];t&&S(e,l)?delete a[e]:(l.source=n,l.defaultDefaultValue=a[e].default,this.updatePropertyDefaultValue(e,l),L.test(e)?l.scope=void 0:(l.scope=s.z(l.scope)?r:l.scope,l.restricted=s.z(l.restricted)?!!i?.includes(e):l.restricted),!a[e].hasOwnProperty("included")||a[e].included?(this.configurationProperties[e]=a[e],a[e].policy?.name&&this.policyConfigurations.set(a[e].policy.name,e),!a[e].deprecationMessage&&a[e].markdownDeprecationMessage&&(a[e].deprecationMessage=a[e].markdownDeprecationMessage),o.add(e)):(this.excludedConfigurationProperties[e]=a[e],delete a[e]))}const l=e.allOf;if(l)for(const e of l)this.validateAndRegisterProperties(e,t,n,i,r,o)}getConfigurationProperties(){return this.configurationProperties}getPolicyConfigurations(){return this.policyConfigurations}registerJSONConfiguration(e){const t=e=>{const n=e.properties;if(n)for(const e in n)this.updateSchema(e,n[e]);const i=e.allOf;i?.forEach(t)};t(e)}updateSchema(e,t){switch(c.properties[e]=t,t.scope){case 1:d.properties[e]=t;break;case 2:g.properties[e]=t;break;case 6:f.properties[e]=t;break;case 3:m.properties[e]=t;break;case 4:p.properties[e]=t;break;case 5:p.properties[e]=t,this.resourceLanguageSettingsSchema.properties[e]=t}}updateOverridePropertyPatternKey(){for(const e of this.overrideIdentifiers.values()){const t=`[${e}]`,n={type:"object",description:o.kg("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),errorMessage:o.kg("overrideSettings.errorMessage","This setting does not support per-language configuration."),$ref:_};this.updatePropertyDefaultValue(t,n),c.properties[t]=n,d.properties[t]=n,g.properties[t]=n,f.properties[t]=n,m.properties[t]=n,p.properties[t]=n}}registerOverridePropertyPatternKey(){const e={type:"object",description:o.kg("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),errorMessage:o.kg("overrideSettings.errorMessage","This setting does not support per-language configuration."),$ref:_};c.patternProperties[v]=e,d.patternProperties[v]=e,g.patternProperties[v]=e,f.patternProperties[v]=e,m.patternProperties[v]=e,p.patternProperties[v]=e,this._onDidSchemaChange.fire()}updatePropertyDefaultValue(e,t){const n=this.configurationDefaultsOverrides.get(e)?.configurationDefaultOverrideValue;let i,r;!n||t.disallowConfigurationDefault&&n.source||(i=n.value,r=n.source),s.b0(i)&&(i=t.defaultDefaultValue,r=void 0),s.b0(i)&&(i=function(e){switch(Array.isArray(e)?e[0]:e){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}(t.type)),t.default=i,t.defaultValueSource=r}};function S(e,t){return e.trim()?L.test(e)?o.kg("config.property.languageDefault","Cannot register '{0}'. This matches property pattern '\\\\[.*\\\\]$' for describing language specific editor settings. Use 'configurationDefaults' contribution.",e):void 0!==y.getConfigurationProperties()[e]?o.kg("config.property.duplicate","Cannot register '{0}'. This property is already registered.",e):t.policy?.name&&void 0!==y.getPolicyConfigurations().get(t.policy?.name)?o.kg("config.policy.duplicate","Cannot register '{0}'. The associated policy {1} is already registered with {2}.",e,t.policy?.name,y.getPolicyConfigurations().get(t.policy?.name)):null:o.kg("config.property.empty","Cannot register an empty property")}h.O.add(u.Configuration,y)},9031:(e,t,n)=>{"use strict";n.d(t,{v:()=>s});class i{constructor(e,t=[],n=!1){this.ctor=e,this.staticArguments=t,this.supportsDelayedInstantiation=n}}const r=[];function s(e,t,n){t instanceof i||(t=new i(t,[],Boolean(n))),r.push([e,t])}},2399:(e,t,n)=>{"use strict";var i;n.d(t,{_Y:()=>r,u1:()=>s}),function(e){e.serviceIds=new Map,e.DI_TARGET="$di$target",e.DI_DEPENDENCIES="$di$dependencies",e.getServiceDependencies=function(t){return t[e.DI_DEPENDENCIES]||[]}}(i||(i={}));const r=s("instantiationService");function s(e){if(i.serviceIds.has(e))return i.serviceIds.get(e);const t=function(e,n,r){if(3!==arguments.length)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");!function(e,t,n){t[i.DI_TARGET]===t?t[i.DI_DEPENDENCIES].push({id:e,index:n}):(t[i.DI_DEPENDENCIES]=[{id:e,index:n}],t[i.DI_TARGET]=t)}(t,e,r)};return t.toString=()=>e,i.serviceIds.set(e,t),t}},1460:(e,t,n)=>{"use strict";n.d(t,{F:()=>s});var i=n(2106),r=n(7167);const s={JSONContribution:"base.contributions.json"},o=new class{constructor(){this._onDidChangeSchema=new i.vl,this.schemasById={}}registerSchema(e,t){var n;this.schemasById[(n=e,n.length>0&&"#"===n.charAt(n.length-1)?n.substring(0,n.length-1):n)]=t,this._onDidChangeSchema.fire(e)}notifySchemaChanged(e){this._onDidChangeSchema.fire(e)}};r.O.add(s.JSONContribution,o)},9950:(e,t,n)=>{"use strict";n.d(t,{rr:()=>Q,$b:()=>Y}),n(2106);var i=n(9235),r=n(3339),s=n(6844),o=n(4327),a=n(9746);function l(...e){switch(e.length){case 1:return(0,a.kg)("contextkey.scanner.hint.didYouMean1","Did you mean {0}?",e[0]);case 2:return(0,a.kg)("contextkey.scanner.hint.didYouMean2","Did you mean {0} or {1}?",e[0],e[1]);case 3:return(0,a.kg)("contextkey.scanner.hint.didYouMean3","Did you mean {0}, {1} or {2}?",e[0],e[1],e[2]);default:return}}const h=(0,a.kg)("contextkey.scanner.hint.didYouForgetToOpenOrCloseQuote","Did you forget to open or close the quote?"),u=(0,a.kg)("contextkey.scanner.hint.didYouForgetToEscapeSlash","Did you forget to escape the '/' (slash) character? Put two backslashes before it to escape, e.g., '\\\\/'.");class c{constructor(){this._input="",this._start=0,this._current=0,this._tokens=[],this._errors=[],this.stringRe=/[a-zA-Z0-9_<>\-\./\\:\*\?\+\[\]\^,#@;"%\$\p{L}-]+/uy}static getLexeme(e){switch(e.type){case 0:return"(";case 1:return")";case 2:return"!";case 3:return e.isTripleEq?"===":"==";case 4:return e.isTripleEq?"!==":"!=";case 5:return"<";case 6:return"<=";case 7:case 8:return">=";case 9:return"=~";case 10:case 17:case 18:case 19:return e.lexeme;case 11:return"true";case 12:return"false";case 13:return"in";case 14:return"not";case 15:return"&&";case 16:return"||";case 20:return"EOF";default:throw(0,o.iH)(`unhandled token type: ${JSON.stringify(e)}; have you forgotten to add a case?`)}}static{this._regexFlags=new Set(["i","g","s","m","y","u"].map((e=>e.charCodeAt(0))))}static{this._keywords=new Map([["not",14],["in",13],["false",12],["true",11]])}reset(e){return this._input=e,this._start=0,this._current=0,this._tokens=[],this._errors=[],this}scan(){for(;!this._isAtEnd();)switch(this._start=this._current,this._advance()){case 40:this._addToken(0);break;case 41:this._addToken(1);break;case 33:if(this._match(61)){const e=this._match(61);this._tokens.push({type:4,offset:this._start,isTripleEq:e})}else this._addToken(2);break;case 39:this._quotedString();break;case 47:this._regex();break;case 61:if(this._match(61)){const e=this._match(61);this._tokens.push({type:3,offset:this._start,isTripleEq:e})}else this._match(126)?this._addToken(9):this._error(l("==","=~"));break;case 60:this._addToken(this._match(61)?6:5);break;case 62:this._addToken(this._match(61)?8:7);break;case 38:this._match(38)?this._addToken(15):this._error(l("&&"));break;case 124:this._match(124)?this._addToken(16):this._error(l("||"));break;case 32:case 13:case 9:case 10:case 160:break;default:this._string()}return this._start=this._current,this._addToken(20),Array.from(this._tokens)}_match(e){return!this._isAtEnd()&&this._input.charCodeAt(this._current)===e&&(this._current++,!0)}_advance(){return this._input.charCodeAt(this._current++)}_peek(){return this._isAtEnd()?0:this._input.charCodeAt(this._current)}_addToken(e){this._tokens.push({type:e,offset:this._start})}_error(e){const t=this._start,n=this._input.substring(this._start,this._current),i={type:19,offset:this._start,lexeme:n};this._errors.push({offset:t,lexeme:n,additionalInfo:e}),this._tokens.push(i)}_string(){this.stringRe.lastIndex=this._start;const e=this.stringRe.exec(this._input);if(e){this._current=this._start+e[0].length;const t=this._input.substring(this._start,this._current),n=c._keywords.get(t);n?this._addToken(n):this._tokens.push({type:17,lexeme:t,offset:this._start})}}_quotedString(){for(;39!==this._peek()&&!this._isAtEnd();)this._advance();this._isAtEnd()?this._error(h):(this._advance(),this._tokens.push({type:18,lexeme:this._input.substring(this._start+1,this._current-1),offset:this._start+1}))}_regex(){let e=this._current,t=!1,n=!1;for(;;){if(e>=this._input.length)return this._current=e,void this._error(u);const i=this._input.charCodeAt(e);if(t)t=!1;else{if(47===i&&!n){e++;break}91===i?n=!0:92===i?t=!0:93===i&&(n=!1)}e++}for(;e<this._input.length&&c._regexFlags.has(this._input.charCodeAt(e));)e++;this._current=e;const i=this._input.substring(this._start,this._current);this._tokens.push({type:10,lexeme:i,offset:this._start})}_isAtEnd(){return this._current>=this._input.length}}var d=n(2399);const g=new Map;g.set("false",!1),g.set("true",!0),g.set("isMac",r.zx),g.set("isLinux",r.j9),g.set("isWindows",r.uF),g.set("isWeb",r.HZ),g.set("isMacNative",r.zx&&!r.HZ),g.set("isEdge",r.UP),g.set("isFirefox",r.gm),g.set("isChrome",r.H8),g.set("isSafari",r.nr);const f=Object.prototype.hasOwnProperty,m={regexParsingWithErrorRecovery:!0},p=(0,a.kg)("contextkey.parser.error.emptyString","Empty context key expression"),_=(0,a.kg)("contextkey.parser.error.emptyString.hint","Did you forget to write an expression? You can also put 'false' or 'true' to always evaluate to false or true, respectively."),b=(0,a.kg)("contextkey.parser.error.noInAfterNot","'in' after 'not'."),k=(0,a.kg)("contextkey.parser.error.closingParenthesis","closing parenthesis ')'"),C=(0,a.kg)("contextkey.parser.error.unexpectedToken","Unexpected token"),v=(0,a.kg)("contextkey.parser.error.unexpectedToken.hint","Did you forget to put && or || before the token?"),L=(0,a.kg)("contextkey.parser.error.unexpectedEOF","Unexpected end of expression"),w=(0,a.kg)("contextkey.parser.error.unexpectedEOF.hint","Did you forget to put a context key?");class y{static{this._parseError=new Error}constructor(e=m){this._config=e,this._scanner=new c,this._tokens=[],this._current=0,this._parsingErrors=[],this._flagsGYRe=/g|y/g}parse(e){if(""!==e){this._tokens=this._scanner.reset(e).scan(),this._current=0,this._parsingErrors=[];try{const e=this._expr();if(!this._isAtEnd()){const e=this._peek(),t=17===e.type?v:void 0;throw this._parsingErrors.push({message:C,offset:e.offset,lexeme:c.getLexeme(e),additionalInfo:t}),y._parseError}return e}catch(e){if(e!==y._parseError)throw e;return}}else this._parsingErrors.push({message:p,offset:0,lexeme:"",additionalInfo:_})}_expr(){return this._or()}_or(){const e=[this._and()];for(;this._matchOne(16);){const t=this._and();e.push(t)}return 1===e.length?e[0]:S.or(...e)}_and(){const e=[this._term()];for(;this._matchOne(15);){const t=this._term();e.push(t)}return 1===e.length?e[0]:S.and(...e)}_term(){if(this._matchOne(2)){const e=this._peek();switch(e.type){case 11:return this._advance(),E.INSTANCE;case 12:return this._advance(),N.INSTANCE;case 0:{this._advance();const e=this._expr();return this._consume(1,k),e?.negate()}case 17:return this._advance(),D.create(e.lexeme);default:throw this._errExpectedButGot("KEY | true | false | '(' expression ')'",e)}}return this._primary()}_primary(){const e=this._peek();switch(e.type){case 11:return this._advance(),S.true();case 12:return this._advance(),S.false();case 0:{this._advance();const e=this._expr();return this._consume(1,k),e}case 17:{const t=e.lexeme;if(this._advance(),this._matchOne(9)){const e=this._peek();if(!this._config.regexParsingWithErrorRecovery){if(this._advance(),10!==e.type)throw this._errExpectedButGot("REGEX",e);const n=e.lexeme,i=n.lastIndexOf("/"),r=i===n.length-1?void 0:this._removeFlagsGY(n.substring(i+1));let s;try{s=new RegExp(n.substring(1,i),r)}catch(t){throw this._errExpectedButGot("REGEX",e)}return V.create(t,s)}switch(e.type){case 10:case 19:{const n=[e.lexeme];this._advance();let i=this._peek(),r=0;for(let t=0;t<e.lexeme.length;t++)40===e.lexeme.charCodeAt(t)?r++:41===e.lexeme.charCodeAt(t)&&r--;for(;!this._isAtEnd()&&15!==i.type&&16!==i.type;){switch(i.type){case 0:r++;break;case 1:r--;break;case 10:case 18:for(let t=0;t<i.lexeme.length;t++)40===i.lexeme.charCodeAt(t)?r++:41===e.lexeme.charCodeAt(t)&&r--}if(r<0)break;n.push(c.getLexeme(i)),this._advance(),i=this._peek()}const s=n.join(""),o=s.lastIndexOf("/"),a=o===s.length-1?void 0:this._removeFlagsGY(s.substring(o+1));let l;try{l=new RegExp(s.substring(1,o),a)}catch(t){throw this._errExpectedButGot("REGEX",e)}return S.regex(t,l)}case 18:{const n=e.lexeme;this._advance();let i=null;if(!(0,s.AV)(n)){const t=n.indexOf("/"),r=n.lastIndexOf("/");if(t!==r&&t>=0){const s=n.slice(t+1,r),o="i"===n[r+1]?"i":"";try{i=new RegExp(s,o)}catch(t){throw this._errExpectedButGot("REGEX",e)}}}if(null===i)throw this._errExpectedButGot("REGEX",e);return V.create(t,i)}default:throw this._errExpectedButGot("REGEX",this._peek())}}if(this._matchOne(14)){this._consume(13,b);const e=this._value();return S.notIn(t,e)}switch(this._peek().type){case 3:{this._advance();const e=this._value();if(18===this._previous().type)return S.equals(t,e);switch(e){case"true":return S.has(t);case"false":return S.not(t);default:return S.equals(t,e)}}case 4:{this._advance();const e=this._value();if(18===this._previous().type)return S.notEquals(t,e);switch(e){case"true":return S.not(t);case"false":return S.has(t);default:return S.notEquals(t,e)}}case 5:return this._advance(),P.create(t,this._value());case 6:return this._advance(),z.create(t,this._value());case 7:return this._advance(),B.create(t,this._value());case 8:return this._advance(),F.create(t,this._value());case 13:return this._advance(),S.in(t,this._value());default:return S.has(t)}}case 20:throw this._parsingErrors.push({message:L,offset:e.offset,lexeme:"",additionalInfo:w}),y._parseError;default:throw this._errExpectedButGot("true | false | KEY \n\t| KEY '=~' REGEX \n\t| KEY ('==' | '!=' | '<' | '<=' | '>' | '>=' | 'in' | 'not' 'in') value",this._peek())}}_value(){const e=this._peek();switch(e.type){case 17:case 18:return this._advance(),e.lexeme;case 11:return this._advance(),"true";case 12:return this._advance(),"false";case 13:return this._advance(),"in";default:return""}}_removeFlagsGY(e){return e.replaceAll(this._flagsGYRe,"")}_previous(){return this._tokens[this._current-1]}_matchOne(e){return!!this._check(e)&&(this._advance(),!0)}_advance(){return this._isAtEnd()||this._current++,this._previous()}_consume(e,t){if(this._check(e))return this._advance();throw this._errExpectedButGot(t,this._peek())}_errExpectedButGot(e,t,n){const i=(0,a.kg)("contextkey.parser.error.expectedButGot","Expected: {0}\nReceived: '{1}'.",e,c.getLexeme(t)),r=t.offset,s=c.getLexeme(t);return this._parsingErrors.push({message:i,offset:r,lexeme:s,additionalInfo:n}),y._parseError}_check(e){return this._peek().type===e}_peek(){return this._tokens[this._current]}_isAtEnd(){return 20===this._peek().type}}class S{static false(){return E.INSTANCE}static true(){return N.INSTANCE}static has(e){return I.create(e)}static equals(e,t){return T.create(e,t)}static notEquals(e,t){return M.create(e,t)}static regex(e,t){return V.create(e,t)}static in(e,t){return A.create(e,t)}static notIn(e,t){return R.create(e,t)}static not(e){return D.create(e)}static and(...e){return H.create(e,null,!0)}static or(...e){return U.create(e,null,!0)}static{this._parser=new y({regexParsingWithErrorRecovery:!1})}static deserialize(e){if(null!=e)return this._parser.parse(e)}}function x(e,t){return e.cmp(t)}class E{static{this.INSTANCE=new E}constructor(){this.type=0}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}substituteConstants(){return this}evaluate(e){return!1}serialize(){return"false"}keys(){return[]}negate(){return N.INSTANCE}}class N{static{this.INSTANCE=new N}constructor(){this.type=1}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}substituteConstants(){return this}evaluate(e){return!0}serialize(){return"true"}keys(){return[]}negate(){return E.INSTANCE}}class I{static create(e,t=null){const n=g.get(e);return"boolean"==typeof n?n?N.INSTANCE:E.INSTANCE:new I(e,t)}constructor(e,t){this.key=e,this.negated=t,this.type=2}cmp(e){return e.type!==this.type?this.type-e.type:j(this.key,e.key)}equals(e){return e.type===this.type&&this.key===e.key}substituteConstants(){const e=g.get(this.key);return"boolean"==typeof e?e?N.INSTANCE:E.INSTANCE:this}evaluate(e){return!!e.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=D.create(this.key,this)),this.negated}}class T{static create(e,t,n=null){if("boolean"==typeof t)return t?I.create(e,n):D.create(e,n);const i=g.get(e);return"boolean"==typeof i?t===(i?"true":"false")?N.INSTANCE:E.INSTANCE:new T(e,t,n)}constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=4}cmp(e){return e.type!==this.type?this.type-e.type:$(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}substituteConstants(){const e=g.get(this.key);if("boolean"==typeof e){const t=e?"true":"false";return this.value===t?N.INSTANCE:E.INSTANCE}return this}evaluate(e){return e.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=M.create(this.key,this.value,this)),this.negated}}class A{static create(e,t){return new A(e,t)}constructor(e,t){this.key=e,this.valueKey=t,this.type=10,this.negated=null}cmp(e){return e.type!==this.type?this.type-e.type:$(this.key,this.valueKey,e.key,e.valueKey)}equals(e){return e.type===this.type&&this.key===e.key&&this.valueKey===e.valueKey}substituteConstants(){return this}evaluate(e){const t=e.getValue(this.valueKey),n=e.getValue(this.key);return Array.isArray(t)?t.includes(n):"string"==typeof n&&"object"==typeof t&&null!==t&&f.call(t,n)}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=R.create(this.key,this.valueKey)),this.negated}}class R{static create(e,t){return new R(e,t)}constructor(e,t){this.key=e,this.valueKey=t,this.type=11,this._negated=A.create(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:this._negated.cmp(e._negated)}equals(e){return e.type===this.type&&this._negated.equals(e._negated)}substituteConstants(){return this}evaluate(e){return!this._negated.evaluate(e)}serialize(){return`${this.key} not in '${this.valueKey}'`}keys(){return this._negated.keys()}negate(){return this._negated}}class M{static create(e,t,n=null){if("boolean"==typeof t)return t?D.create(e,n):I.create(e,n);const i=g.get(e);return"boolean"==typeof i?t===(i?"true":"false")?E.INSTANCE:N.INSTANCE:new M(e,t,n)}constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=5}cmp(e){return e.type!==this.type?this.type-e.type:$(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}substituteConstants(){const e=g.get(this.key);if("boolean"==typeof e){const t=e?"true":"false";return this.value===t?E.INSTANCE:N.INSTANCE}return this}evaluate(e){return e.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=T.create(this.key,this.value,this)),this.negated}}class D{static create(e,t=null){const n=g.get(e);return"boolean"==typeof n?n?E.INSTANCE:N.INSTANCE:new D(e,t)}constructor(e,t){this.key=e,this.negated=t,this.type=3}cmp(e){return e.type!==this.type?this.type-e.type:j(this.key,e.key)}equals(e){return e.type===this.type&&this.key===e.key}substituteConstants(){const e=g.get(this.key);return"boolean"==typeof e?e?E.INSTANCE:N.INSTANCE:this}evaluate(e){return!e.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=I.create(this.key,this)),this.negated}}function O(e,t){if("string"==typeof e){const t=parseFloat(e);isNaN(t)||(e=t)}return"string"==typeof e||"number"==typeof e?t(e):E.INSTANCE}class B{static create(e,t,n=null){return O(t,(t=>new B(e,t,n)))}constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=12}cmp(e){return e.type!==this.type?this.type-e.type:$(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}substituteConstants(){return this}evaluate(e){return"string"!=typeof this.value&&parseFloat(e.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=z.create(this.key,this.value,this)),this.negated}}class F{static create(e,t,n=null){return O(t,(t=>new F(e,t,n)))}constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=13}cmp(e){return e.type!==this.type?this.type-e.type:$(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}substituteConstants(){return this}evaluate(e){return"string"!=typeof this.value&&parseFloat(e.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=P.create(this.key,this.value,this)),this.negated}}class P{static create(e,t,n=null){return O(t,(t=>new P(e,t,n)))}constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=14}cmp(e){return e.type!==this.type?this.type-e.type:$(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}substituteConstants(){return this}evaluate(e){return"string"!=typeof this.value&&parseFloat(e.getValue(this.key))<this.value}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=F.create(this.key,this.value,this)),this.negated}}class z{static create(e,t,n=null){return O(t,(t=>new z(e,t,n)))}constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=15}cmp(e){return e.type!==this.type?this.type-e.type:$(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}substituteConstants(){return this}evaluate(e){return"string"!=typeof this.value&&parseFloat(e.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=B.create(this.key,this.value,this)),this.negated}}class V{static create(e,t){return new V(e,t)}constructor(e,t){this.key=e,this.regexp=t,this.type=7,this.negated=null}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.key<e.key)return-1;if(this.key>e.key)return 1;const t=this.regexp?this.regexp.source:"",n=e.regexp?e.regexp.source:"";return t<n?-1:t>n?1:0}equals(e){if(e.type===this.type){const t=this.regexp?this.regexp.source:"",n=e.regexp?e.regexp.source:"";return this.key===e.key&&t===n}return!1}substituteConstants(){return this}evaluate(e){const t=e.getValue(this.key);return!!this.regexp&&this.regexp.test(t)}serialize(){const e=this.regexp?`/${this.regexp.source}/${this.regexp.flags}`:"/invalid/";return`${this.key} =~ ${e}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=q.create(this)),this.negated}}class q{static create(e){return new q(e)}constructor(e){this._actual=e,this.type=8}cmp(e){return e.type!==this.type?this.type-e.type:this._actual.cmp(e._actual)}equals(e){return e.type===this.type&&this._actual.equals(e._actual)}substituteConstants(){return this}evaluate(e){return!this._actual.evaluate(e)}serialize(){return`!(${this._actual.serialize()})`}keys(){return this._actual.keys()}negate(){return this._actual}}function W(e){let t=null;for(let n=0,i=e.length;n<i;n++){const i=e[n].substituteConstants();if(e[n]!==i&&null===t){t=[];for(let i=0;i<n;i++)t[i]=e[i]}null!==t&&(t[n]=i)}return null===t?e:t}class H{static create(e,t,n){return H._normalizeArr(e,t,n)}constructor(e,t){this.expr=e,this.negated=t,this.type=6}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.expr.length<e.expr.length)return-1;if(this.expr.length>e.expr.length)return 1;for(let t=0,n=this.expr.length;t<n;t++){const n=x(this.expr[t],e.expr[t]);if(0!==n)return n}return 0}equals(e){if(e.type===this.type){if(this.expr.length!==e.expr.length)return!1;for(let t=0,n=this.expr.length;t<n;t++)if(!this.expr[t].equals(e.expr[t]))return!1;return!0}return!1}substituteConstants(){const e=W(this.expr);return e===this.expr?this:H.create(e,this.negated,!1)}evaluate(e){for(let t=0,n=this.expr.length;t<n;t++)if(!this.expr[t].evaluate(e))return!1;return!0}static _normalizeArr(e,t,n){const i=[];let r=!1;for(const t of e)if(t)if(1!==t.type){if(0===t.type)return E.INSTANCE;6!==t.type?i.push(t):i.push(...t.expr)}else r=!0;if(0===i.length&&r)return N.INSTANCE;if(0!==i.length){if(1===i.length)return i[0];i.sort(x);for(let e=1;e<i.length;e++)i[e-1].equals(i[e])&&(i.splice(e,1),e--);if(1===i.length)return i[0];for(;i.length>1;){const e=i[i.length-1];if(9!==e.type)break;i.pop();const t=i.pop(),r=0===i.length,s=U.create(e.expr.map((e=>H.create([e,t],null,n))),null,r);s&&(i.push(s),i.sort(x))}if(1===i.length)return i[0];if(n){for(let e=0;e<i.length;e++)for(let t=e+1;t<i.length;t++)if(i[e].negate().equals(i[t]))return E.INSTANCE;if(1===i.length)return i[0]}return new H(i,t)}}serialize(){return this.expr.map((e=>e.serialize())).join(" && ")}keys(){const e=[];for(const t of this.expr)e.push(...t.keys());return e}negate(){if(!this.negated){const e=[];for(const t of this.expr)e.push(t.negate());this.negated=U.create(e,this,!0)}return this.negated}}class U{static create(e,t,n){return U._normalizeArr(e,t,n)}constructor(e,t){this.expr=e,this.negated=t,this.type=9}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.expr.length<e.expr.length)return-1;if(this.expr.length>e.expr.length)return 1;for(let t=0,n=this.expr.length;t<n;t++){const n=x(this.expr[t],e.expr[t]);if(0!==n)return n}return 0}equals(e){if(e.type===this.type){if(this.expr.length!==e.expr.length)return!1;for(let t=0,n=this.expr.length;t<n;t++)if(!this.expr[t].equals(e.expr[t]))return!1;return!0}return!1}substituteConstants(){const e=W(this.expr);return e===this.expr?this:U.create(e,this.negated,!1)}evaluate(e){for(let t=0,n=this.expr.length;t<n;t++)if(this.expr[t].evaluate(e))return!0;return!1}static _normalizeArr(e,t,n){let i=[],r=!1;if(e){for(let t=0,n=e.length;t<n;t++){const n=e[t];if(n)if(0!==n.type){if(1===n.type)return N.INSTANCE;9!==n.type?i.push(n):i=i.concat(n.expr)}else r=!0}if(0===i.length&&r)return E.INSTANCE;i.sort(x)}if(0!==i.length){if(1===i.length)return i[0];for(let e=1;e<i.length;e++)i[e-1].equals(i[e])&&(i.splice(e,1),e--);if(1===i.length)return i[0];if(n){for(let e=0;e<i.length;e++)for(let t=e+1;t<i.length;t++)if(i[e].negate().equals(i[t]))return N.INSTANCE;if(1===i.length)return i[0]}return new U(i,t)}}serialize(){return this.expr.map((e=>e.serialize())).join(" || ")}keys(){const e=[];for(const t of this.expr)e.push(...t.keys());return e}negate(){if(!this.negated){const e=[];for(const t of this.expr)e.push(t.negate());for(;e.length>1;){const t=e.shift(),n=e.shift(),i=[];for(const e of G(t))for(const t of G(n))i.push(H.create([e,t],null,!1));e.unshift(U.create(i,null,!1))}this.negated=U.create(e,this,!0)}return this.negated}}class K extends I{static{this._info=[]}static all(){return K._info.values()}constructor(e,t,n){super(e,null),this._defaultValue=t,"object"==typeof n?K._info.push({...n,key:e}):!0!==n&&K._info.push({key:e,description:n,type:null!=t?typeof t:void 0})}bindTo(e){return e.createKey(this.key,this._defaultValue)}getValue(e){return e.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(e){return T.create(this.key,e)}}function j(e,t){return e<t?-1:e>t?1:0}function $(e,t,n,i){return e<n?-1:e>n?1:t<i?-1:t>i?1:0}function G(e){return 9===e.type?e.expr:[e]}(0,d.u1)("contextKeyService");const Q=(0,d.u1)("logService");var Y;!function(e){e[e.Off=0]="Off",e[e.Trace=1]="Trace",e[e.Debug=2]="Debug",e[e.Info=3]="Info",e[e.Warning=4]="Warning",e[e.Error=5]="Error"}(Y||(Y={})),Y.Info,i.jG,new K("logLevel",function(e){switch(e){case Y.Trace:return"trace";case Y.Debug:return"debug";case Y.Info:return"info";case Y.Warning:return"warn";case Y.Error:return"error";case Y.Off:return"off"}}(Y.Info))},7167:(e,t,n)=>{"use strict";n.d(t,{O:()=>s});var i=n(7110),r=n(9359);const s=new class{constructor(){this.data=new Map}add(e,t){i.ok(r.Kg(e)),i.ok(r.Gv(t)),i.ok(!this.data.has(e),"There is already an extension with this id"),this.data.set(e,t)}as(e){return this.data.get(e)||null}}},61:(e,t,n)=>{"use strict";n.d(t,{buw:()=>S,b1q:()=>y,YtV:()=>A,Ubg:()=>W,IIb:()=>V,pOz:()=>z,whs:()=>B,Stt:()=>P,Hng:()=>F,yLC:()=>le,KoI:()=>oe,uMG:()=>ae,x1A:()=>c});var i=n(7110),r=n(1946),s=n(4901),o=n(2106),a=n(1460),l=n(7167),h=n(9746);const u=new class{constructor(){this._onDidChangeSchema=new o.vl,this.onDidChangeSchema=this._onDidChangeSchema.event,this.colorSchema={type:"object",properties:{}},this.colorReferenceSchema={type:"string",enum:[],enumDescriptions:[]},this.colorsById={}}registerColor(e,t,n,i=!1,r){const s={id:e,description:n,defaults:t,needsTransparency:i,deprecationMessage:r};this.colorsById[e]=s;const o={type:"string",format:"color-hex",defaultSnippets:[{body:"${1:#ff0000}"}]};return r&&(o.deprecationMessage=r),i&&(o.pattern="^#(?:(?<rgba>[0-9a-fA-f]{3}[0-9a-eA-E])|(?:[0-9a-fA-F]{6}(?:(?![fF]{2})(?:[0-9a-fA-F]{2}))))?$",o.patternErrorMessage=h.kg("transparecyRequired","This color must be transparent or it will obscure content")),this.colorSchema.properties[e]={description:n,oneOf:[o,{type:"string",const:"default",description:h.kg("useDefault","Use the default color.")}]},this.colorReferenceSchema.enum.push(e),this.colorReferenceSchema.enumDescriptions.push(n),this._onDidChangeSchema.fire(),e}getColors(){return Object.keys(this.colorsById).map((e=>this.colorsById[e]))}resolveDefaultColor(e,t){const n=this.colorsById[e];if(n?.defaults)return _(null!==(i=n.defaults)&&"object"==typeof i&&"light"in i&&"dark"in i?n.defaults[t.type]:n.defaults,t);var i}getColorSchema(){return this.colorSchema}toString(){return Object.keys(this.colorsById).sort(((e,t)=>{const n=-1===e.indexOf(".")?0:1,i=-1===t.indexOf(".")?0:1;return n!==i?n-i:e.localeCompare(t)})).map((e=>`- \`${e}\`: ${this.colorsById[e].description}`)).join("\n")}};function c(e,t,n,i,r){return u.registerColor(e,t,n,i,r)}function d(e,t){return{op:0,value:e,factor:t}}function g(e,t){return{op:1,value:e,factor:t}}function f(e,t){return{op:2,value:e,factor:t}}function m(...e){return{op:4,values:e}}function p(e,t,n,i){return{op:5,value:e,background:t,factor:n,transparency:i}}function _(e,t){if(null!==e)return"string"==typeof e?"#"===e[0]?s.Q1.fromHex(e):t.getColor(e):e instanceof s.Q1?e:"object"==typeof e?function(e,t){switch(e.op){case 0:return _(e.value,t)?.darken(e.factor);case 1:return _(e.value,t)?.lighten(e.factor);case 2:return _(e.value,t)?.transparent(e.factor);case 3:{const n=_(e.background,t);return n?_(e.value,t)?.makeOpaque(n):_(e.value,t)}case 4:for(const n of e.values){const e=_(n,t);if(e)return e}return;case 6:return _(t.defines(e.if)?e.then:e.else,t);case 5:{const n=_(e.value,t);if(!n)return;const i=_(e.background,t);return i?n.isDarkerThan(i)?s.Q1.getLighterColor(n,i,e.factor).transparent(e.transparency):s.Q1.getDarkerColor(n,i,e.factor).transparent(e.transparency):n.transparent(e.factor*e.transparency)}default:throw(0,i.xb)(e)}}(e,t):void 0}l.O.add("base.contributions.colors",u);const b="vscode://schemas/workbench-colors",k=l.O.as(a.F.JSONContribution);k.registerSchema(b,u.getColorSchema());const C=new r.uC((()=>k.notifySchemaChanged(b)),200);u.onDidChangeSchema((()=>{C.isScheduled()||C.schedule()}));const v=c("foreground",{dark:"#CCCCCC",light:"#616161",hcDark:"#FFFFFF",hcLight:"#292929"},h.kg("foreground","Overall foreground color. This color is only used if not overridden by a component.")),L=(c("disabledForeground",{dark:"#CCCCCC80",light:"#61616180",hcDark:"#A5A5A5",hcLight:"#7F7F7F"},h.kg("disabledForeground","Overall foreground for disabled elements. This color is only used if not overridden by a component.")),c("errorForeground",{dark:"#F48771",light:"#A1260D",hcDark:"#F48771",hcLight:"#B5200D"},h.kg("errorForeground","Overall foreground color for error messages. This color is only used if not overridden by a component.")),c("descriptionForeground",{light:"#717171",dark:f(v,.7),hcDark:f(v,.7),hcLight:f(v,.7)},h.kg("descriptionForeground","Foreground color for description text providing additional information, for example for a label.")),c("icon.foreground",{dark:"#C5C5C5",light:"#424242",hcDark:"#FFFFFF",hcLight:"#292929"},h.kg("iconForeground","The default color for icons in the workbench."))),w=c("focusBorder",{dark:"#007FD4",light:"#0090F1",hcDark:"#F38518",hcLight:"#006BBD"},h.kg("focusBorder","Overall border color for focused elements. This color is only used if not overridden by a component.")),y=c("contrastBorder",{light:null,dark:null,hcDark:"#6FC3DF",hcLight:"#0F4A85"},h.kg("contrastBorder","An extra border around elements to separate them from others for greater contrast.")),S=c("contrastActiveBorder",{light:null,dark:null,hcDark:w,hcLight:w},h.kg("activeContrastBorder","An extra border around active elements to separate them from others for greater contrast.")),x=(c("selection.background",null,h.kg("selectionBackground","The background color of text selections in the workbench (e.g. for input fields or text areas). Note that this does not apply to selections within the editor.")),c("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hcDark:"#21A6FF",hcLight:"#0F4A85"},h.kg("textLinkForeground","Foreground color for links in text.")),c("textLink.activeForeground",{light:"#006AB1",dark:"#3794FF",hcDark:"#21A6FF",hcLight:"#0F4A85"},h.kg("textLinkActiveForeground","Foreground color for links in text when clicked on and on mouse hover.")),c("textSeparator.foreground",{light:"#0000002e",dark:"#ffffff2e",hcDark:s.Q1.black,hcLight:"#292929"},h.kg("textSeparatorForeground","Color for text separators.")),c("textPreformat.foreground",{light:"#A31515",dark:"#D7BA7D",hcDark:"#000000",hcLight:"#FFFFFF"},h.kg("textPreformatForeground","Foreground color for preformatted text segments.")),c("textPreformat.background",{light:"#0000001A",dark:"#FFFFFF1A",hcDark:"#FFFFFF",hcLight:"#09345f"},h.kg("textPreformatBackground","Background color for preformatted text segments.")),c("textBlockQuote.background",{light:"#f2f2f2",dark:"#222222",hcDark:null,hcLight:"#F2F2F2"},h.kg("textBlockQuoteBackground","Background color for block quotes in text.")),c("textBlockQuote.border",{light:"#007acc80",dark:"#007acc80",hcDark:s.Q1.white,hcLight:"#292929"},h.kg("textBlockQuoteBorder","Border color for block quotes in text.")),c("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hcDark:s.Q1.black,hcLight:"#F2F2F2"},h.kg("textCodeBlockBackground","Background color for code blocks in text.")),c("sash.hoverBorder",w,h.kg("sashActiveBorder","Border color of active sashes.")),c("badge.background",{dark:"#4D4D4D",light:"#C4C4C4",hcDark:s.Q1.black,hcLight:"#0F4A85"},h.kg("badgeBackground","Badge background color. Badges are small information labels, e.g. for search results count."))),E=(c("badge.foreground",{dark:s.Q1.white,light:"#333",hcDark:s.Q1.white,hcLight:s.Q1.white},h.kg("badgeForeground","Badge foreground color. Badges are small information labels, e.g. for search results count.")),c("scrollbar.shadow",{dark:"#000000",light:"#DDDDDD",hcDark:null,hcLight:null},h.kg("scrollbarShadow","Scrollbar shadow to indicate that the view is scrolled."))),N=c("scrollbarSlider.background",{dark:s.Q1.fromHex("#797979").transparent(.4),light:s.Q1.fromHex("#646464").transparent(.4),hcDark:f(y,.6),hcLight:f(y,.4)},h.kg("scrollbarSliderBackground","Scrollbar slider background color.")),I=c("scrollbarSlider.hoverBackground",{dark:s.Q1.fromHex("#646464").transparent(.7),light:s.Q1.fromHex("#646464").transparent(.7),hcDark:f(y,.8),hcLight:f(y,.8)},h.kg("scrollbarSliderHoverBackground","Scrollbar slider background color when hovering.")),T=c("scrollbarSlider.activeBackground",{dark:s.Q1.fromHex("#BFBFBF").transparent(.4),light:s.Q1.fromHex("#000000").transparent(.6),hcDark:y,hcLight:y},h.kg("scrollbarSliderActiveBackground","Scrollbar slider background color when clicked on.")),A=(c("progressBar.background",{dark:s.Q1.fromHex("#0E70C0"),light:s.Q1.fromHex("#0E70C0"),hcDark:y,hcLight:y},h.kg("progressBarBackground","Background color of the progress bar that can show for long running operations.")),c("editor.background",{light:"#ffffff",dark:"#1E1E1E",hcDark:s.Q1.black,hcLight:s.Q1.white},h.kg("editorBackground","Editor background color."))),R=(c("editor.foreground",{light:"#333333",dark:"#BBBBBB",hcDark:s.Q1.white,hcLight:v},h.kg("editorForeground","Editor default foreground color.")),c("editorStickyScroll.background",A,h.kg("editorStickyScrollBackground","Background color of sticky scroll in the editor")),c("editorStickyScrollHover.background",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:null,hcLight:s.Q1.fromHex("#0F4A85").transparent(.1)},h.kg("editorStickyScrollHoverBackground","Background color of sticky scroll on hover in the editor")),c("editorStickyScroll.border",{dark:null,light:null,hcDark:y,hcLight:y},h.kg("editorStickyScrollBorder","Border color of sticky scroll in the editor")),c("editorStickyScroll.shadow",E,h.kg("editorStickyScrollShadow"," Shadow color of sticky scroll in the editor")),c("editorWidget.background",{dark:"#252526",light:"#F3F3F3",hcDark:"#0C141F",hcLight:s.Q1.white},h.kg("editorWidgetBackground","Background color of editor widgets, such as find/replace."))),M=c("editorWidget.foreground",v,h.kg("editorWidgetForeground","Foreground color of editor widgets, such as find/replace.")),D=c("editorWidget.border",{dark:"#454545",light:"#C8C8C8",hcDark:y,hcLight:y},h.kg("editorWidgetBorder","Border color of editor widgets. The color is only used if the widget chooses to have a border and if the color is not overridden by a widget.")),O=(c("editorWidget.resizeBorder",null,h.kg("editorWidgetResizeBorder","Border color of the resize bar of editor widgets. The color is only used if the widget chooses to have a resize border and if the color is not overridden by a widget.")),c("editorError.background",null,h.kg("editorError.background","Background color of error text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),c("editorError.foreground",{dark:"#F14C4C",light:"#E51400",hcDark:"#F48771",hcLight:"#B5200D"},h.kg("editorError.foreground","Foreground color of error squigglies in the editor."))),B=(c("editorError.border",{dark:null,light:null,hcDark:s.Q1.fromHex("#E47777").transparent(.8),hcLight:"#B5200D"},h.kg("errorBorder","If set, color of double underlines for errors in the editor.")),c("editorWarning.background",null,h.kg("editorWarning.background","Background color of warning text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0)),F=c("editorWarning.foreground",{dark:"#CCA700",light:"#BF8803",hcDark:"#FFD370",hcLight:"#895503"},h.kg("editorWarning.foreground","Foreground color of warning squigglies in the editor.")),P=c("editorWarning.border",{dark:null,light:null,hcDark:s.Q1.fromHex("#FFCC00").transparent(.8),hcLight:s.Q1.fromHex("#FFCC00").transparent(.8)},h.kg("warningBorder","If set, color of double underlines for warnings in the editor.")),z=(c("editorInfo.background",null,h.kg("editorInfo.background","Background color of info text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),c("editorInfo.foreground",{dark:"#3794FF",light:"#1a85ff",hcDark:"#3794FF",hcLight:"#1a85ff"},h.kg("editorInfo.foreground","Foreground color of info squigglies in the editor."))),V=c("editorInfo.border",{dark:null,light:null,hcDark:s.Q1.fromHex("#3794FF").transparent(.8),hcLight:"#292929"},h.kg("infoBorder","If set, color of double underlines for infos in the editor.")),q=(c("editorHint.foreground",{dark:s.Q1.fromHex("#eeeeee").transparent(.7),light:"#6c6c6c",hcDark:null,hcLight:null},h.kg("editorHint.foreground","Foreground color of hint squigglies in the editor.")),c("editorHint.border",{dark:null,light:null,hcDark:s.Q1.fromHex("#eeeeee").transparent(.8),hcLight:"#292929"},h.kg("hintBorder","If set, color of double underlines for hints in the editor.")),c("editorLink.activeForeground",{dark:"#4E94CE",light:s.Q1.blue,hcDark:s.Q1.cyan,hcLight:"#292929"},h.kg("activeLinkForeground","Color of active links.")),c("editor.selectionBackground",{light:"#ADD6FF",dark:"#264F78",hcDark:"#f3f518",hcLight:"#0F4A85"},h.kg("editorSelectionBackground","Color of the editor selection."))),W=(c("editor.selectionForeground",{light:null,dark:null,hcDark:"#000000",hcLight:s.Q1.white},h.kg("editorSelectionForeground","Color of the selected text for high contrast.")),c("editor.inactiveSelectionBackground",{light:f(q,.5),dark:f(q,.5),hcDark:f(q,.7),hcLight:f(q,.5)},h.kg("editorInactiveSelection","Color of the selection in an inactive editor. The color must not be opaque so as not to hide underlying decorations."),!0),c("editor.selectionHighlightBackground",{light:p(q,A,.3,.6),dark:p(q,A,.3,.6),hcDark:null,hcLight:null},h.kg("editorSelectionHighlight","Color for regions with the same content as the selection. The color must not be opaque so as not to hide underlying decorations."),!0),c("editor.selectionHighlightBorder",{light:null,dark:null,hcDark:S,hcLight:S},h.kg("editorSelectionHighlightBorder","Border color for regions with the same content as the selection.")),c("editor.findMatchBackground",{light:"#A8AC94",dark:"#515C6A",hcDark:null,hcLight:null},h.kg("editorFindMatch","Color of the current search match.")),c("editor.findMatchForeground",null,h.kg("editorFindMatchForeground","Text color of the current search match.")),c("editor.findMatchHighlightBackground",{light:"#EA5C0055",dark:"#EA5C0055",hcDark:null,hcLight:null},h.kg("findMatchHighlight","Color of the other search matches. The color must not be opaque so as not to hide underlying decorations."),!0)),H=(c("editor.findMatchHighlightForeground",null,h.kg("findMatchHighlightForeground","Foreground color of the other search matches."),!0),c("editor.findRangeHighlightBackground",{dark:"#3a3d4166",light:"#b4b4b44d",hcDark:null,hcLight:null},h.kg("findRangeHighlight","Color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),c("editor.findMatchBorder",{light:null,dark:null,hcDark:S,hcLight:S},h.kg("editorFindMatchBorder","Border color of the current search match.")),c("editor.findMatchHighlightBorder",{light:null,dark:null,hcDark:S,hcLight:S},h.kg("findMatchHighlightBorder","Border color of the other search matches."))),U=(c("editor.findRangeHighlightBorder",{dark:null,light:null,hcDark:f(S,.4),hcLight:f(S,.4)},h.kg("findRangeHighlightBorder","Border color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),c("editor.hoverHighlightBackground",{light:"#ADD6FF26",dark:"#264f7840",hcDark:"#ADD6FF26",hcLight:null},h.kg("hoverHighlight","Highlight below the word for which a hover is shown. The color must not be opaque so as not to hide underlying decorations."),!0),c("editorHoverWidget.background",R,h.kg("hoverBackground","Background color of the editor hover."))),K=(c("editorHoverWidget.foreground",M,h.kg("hoverForeground","Foreground color of the editor hover.")),c("editorHoverWidget.border",D,h.kg("hoverBorder","Border color of the editor hover.")),c("editorHoverWidget.statusBarBackground",{dark:g(U,.2),light:d(U,.05),hcDark:R,hcLight:R},h.kg("statusBarBackground","Background color of the editor hover status bar.")),c("editorInlayHint.foreground",{dark:"#969696",light:"#969696",hcDark:s.Q1.white,hcLight:s.Q1.black},h.kg("editorInlayHintForeground","Foreground color of inline hints"))),j=c("editorInlayHint.background",{dark:f(x,.1),light:f(x,.1),hcDark:f(s.Q1.white,.1),hcLight:f(x,.1)},h.kg("editorInlayHintBackground","Background color of inline hints")),$=(c("editorInlayHint.typeForeground",K,h.kg("editorInlayHintForegroundTypes","Foreground color of inline hints for types")),c("editorInlayHint.typeBackground",j,h.kg("editorInlayHintBackgroundTypes","Background color of inline hints for types")),c("editorInlayHint.parameterForeground",K,h.kg("editorInlayHintForegroundParameter","Foreground color of inline hints for parameters")),c("editorInlayHint.parameterBackground",j,h.kg("editorInlayHintBackgroundParameter","Background color of inline hints for parameters")),c("editorLightBulb.foreground",{dark:"#FFCC00",light:"#DDB100",hcDark:"#FFCC00",hcLight:"#007ACC"},h.kg("editorLightBulbForeground","The color used for the lightbulb actions icon."))),G=(c("editorLightBulbAutoFix.foreground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},h.kg("editorLightBulbAutoFixForeground","The color used for the lightbulb auto fix actions icon.")),c("editorLightBulbAi.foreground",$,h.kg("editorLightBulbAiForeground","The color used for the lightbulb AI icon.")),c("editor.snippetTabstopHighlightBackground",{dark:new s.Q1(new s.bU(124,124,124,.3)),light:new s.Q1(new s.bU(10,50,100,.2)),hcDark:new s.Q1(new s.bU(124,124,124,.3)),hcLight:new s.Q1(new s.bU(10,50,100,.2))},h.kg("snippetTabstopHighlightBackground","Highlight background color of a snippet tabstop.")),c("editor.snippetTabstopHighlightBorder",null,h.kg("snippetTabstopHighlightBorder","Highlight border color of a snippet tabstop.")),c("editor.snippetFinalTabstopHighlightBackground",null,h.kg("snippetFinalTabstopHighlightBackground","Highlight background color of the final tabstop of a snippet.")),c("editor.snippetFinalTabstopHighlightBorder",{dark:"#525252",light:new s.Q1(new s.bU(10,50,100,.5)),hcDark:"#525252",hcLight:"#292929"},h.kg("snippetFinalTabstopHighlightBorder","Highlight border color of the final tabstop of a snippet.")),new s.Q1(new s.bU(155,185,85,.2))),Q=new s.Q1(new s.bU(255,0,0,.2)),Y=(c("diffEditor.insertedTextBackground",{dark:"#9ccc2c33",light:"#9ccc2c40",hcDark:null,hcLight:null},h.kg("diffEditorInserted","Background color for text that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),c("diffEditor.removedTextBackground",{dark:"#ff000033",light:"#ff000033",hcDark:null,hcLight:null},h.kg("diffEditorRemoved","Background color for text that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),c("diffEditor.insertedLineBackground",{dark:G,light:G,hcDark:null,hcLight:null},h.kg("diffEditorInsertedLines","Background color for lines that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),c("diffEditor.removedLineBackground",{dark:Q,light:Q,hcDark:null,hcLight:null},h.kg("diffEditorRemovedLines","Background color for lines that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),c("diffEditorGutter.insertedLineBackground",null,h.kg("diffEditorInsertedLineGutter","Background color for the margin where lines got inserted.")),c("diffEditorGutter.removedLineBackground",null,h.kg("diffEditorRemovedLineGutter","Background color for the margin where lines got removed.")),c("diffEditorOverview.insertedForeground",null,h.kg("diffEditorOverviewInserted","Diff overview ruler foreground for inserted content.")),c("diffEditorOverview.removedForeground",null,h.kg("diffEditorOverviewRemoved","Diff overview ruler foreground for removed content.")),c("diffEditor.insertedTextBorder",{dark:null,light:null,hcDark:"#33ff2eff",hcLight:"#374E06"},h.kg("diffEditorInsertedOutline","Outline color for the text that got inserted.")),c("diffEditor.removedTextBorder",{dark:null,light:null,hcDark:"#FF008F",hcLight:"#AD0707"},h.kg("diffEditorRemovedOutline","Outline color for text that got removed.")),c("diffEditor.border",{dark:null,light:null,hcDark:y,hcLight:y},h.kg("diffEditorBorder","Border color between the two text editors.")),c("diffEditor.diagonalFill",{dark:"#cccccc33",light:"#22222233",hcDark:null,hcLight:null},h.kg("diffDiagonalFill","Color of the diff editor's diagonal fill. The diagonal fill is used in side-by-side diff views.")),c("diffEditor.unchangedRegionBackground","sideBar.background",h.kg("diffEditor.unchangedRegionBackground","The background color of unchanged blocks in the diff editor.")),c("diffEditor.unchangedRegionForeground","foreground",h.kg("diffEditor.unchangedRegionForeground","The foreground color of unchanged blocks in the diff editor.")),c("diffEditor.unchangedCodeBackground",{dark:"#74747429",light:"#b8b8b829",hcDark:null,hcLight:null},h.kg("diffEditor.unchangedCodeBackground","The background color of unchanged code in the diff editor.")),c("widget.shadow",{dark:f(s.Q1.black,.36),light:f(s.Q1.black,.16),hcDark:null,hcLight:null},h.kg("widgetShadow","Shadow color of widgets such as find/replace inside the editor."))),X=(c("widget.border",{dark:null,light:null,hcDark:y,hcLight:y},h.kg("widgetBorder","Border color of widgets such as find/replace inside the editor.")),c("toolbar.hoverBackground",{dark:"#5a5d5e50",light:"#b8b8b850",hcDark:null,hcLight:null},h.kg("toolbarHoverBackground","Toolbar background when hovering over actions using the mouse"))),Z=(c("toolbar.hoverOutline",{dark:null,light:null,hcDark:S,hcLight:S},h.kg("toolbarHoverOutline","Toolbar outline when hovering over actions using the mouse")),c("toolbar.activeBackground",{dark:g(X,.1),light:d(X,.1),hcDark:null,hcLight:null},h.kg("toolbarActiveBackground","Toolbar background when holding the mouse over actions")),c("breadcrumb.foreground",f(v,.8),h.kg("breadcrumbsFocusForeground","Color of focused breadcrumb items.")),c("breadcrumb.background",A,h.kg("breadcrumbsBackground","Background color of breadcrumb items.")),c("breadcrumb.focusForeground",{light:d(v,.2),dark:g(v,.1),hcDark:g(v,.1),hcLight:g(v,.1)},h.kg("breadcrumbsFocusForeground","Color of focused breadcrumb items.")),c("breadcrumb.activeSelectionForeground",{light:d(v,.2),dark:g(v,.1),hcDark:g(v,.1),hcLight:g(v,.1)},h.kg("breadcrumbsSelectedForeground","Color of selected breadcrumb items.")),c("breadcrumbPicker.background",R,h.kg("breadcrumbsSelectedBackground","Background color of breadcrumb item picker.")),s.Q1.fromHex("#40C8AE").transparent(.5)),J=s.Q1.fromHex("#40A6FF").transparent(.5),ee=s.Q1.fromHex("#606060").transparent(.4),te=c("merge.currentHeaderBackground",{dark:Z,light:Z,hcDark:null,hcLight:null},h.kg("mergeCurrentHeaderBackground","Current header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),ne=(c("merge.currentContentBackground",f(te,.4),h.kg("mergeCurrentContentBackground","Current content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),c("merge.incomingHeaderBackground",{dark:J,light:J,hcDark:null,hcLight:null},h.kg("mergeIncomingHeaderBackground","Incoming header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0)),ie=(c("merge.incomingContentBackground",f(ne,.4),h.kg("mergeIncomingContentBackground","Incoming content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),c("merge.commonHeaderBackground",{dark:ee,light:ee,hcDark:null,hcLight:null},h.kg("mergeCommonHeaderBackground","Common ancestor header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0)),re=(c("merge.commonContentBackground",f(ie,.4),h.kg("mergeCommonContentBackground","Common ancestor content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),c("merge.border",{dark:null,light:null,hcDark:"#C3DF6F",hcLight:"#007ACC"},h.kg("mergeBorder","Border color on headers and the splitter in inline merge-conflicts."))),se=(c("editorOverviewRuler.currentContentForeground",{dark:f(te,1),light:f(te,1),hcDark:re,hcLight:re},h.kg("overviewRulerCurrentContentForeground","Current overview ruler foreground for inline merge-conflicts.")),c("editorOverviewRuler.incomingContentForeground",{dark:f(ne,1),light:f(ne,1),hcDark:re,hcLight:re},h.kg("overviewRulerIncomingContentForeground","Incoming overview ruler foreground for inline merge-conflicts.")),c("editorOverviewRuler.commonContentForeground",{dark:f(ie,1),light:f(ie,1),hcDark:re,hcLight:re},h.kg("overviewRulerCommonContentForeground","Common ancestor overview ruler foreground for inline merge-conflicts.")),c("editorOverviewRuler.findMatchForeground",{dark:"#d186167e",light:"#d186167e",hcDark:"#AB5A00",hcLight:"#AB5A00"},h.kg("overviewRulerFindMatchForeground","Overview ruler marker color for find matches. The color must not be opaque so as not to hide underlying decorations."),!0),c("editorOverviewRuler.selectionHighlightForeground","#A0A0A0CC",h.kg("overviewRulerSelectionHighlightForeground","Overview ruler marker color for selection highlights. The color must not be opaque so as not to hide underlying decorations."),!0),c("problemsErrorIcon.foreground",O,h.kg("problemsErrorIconForeground","The color used for the problems error icon.")),c("problemsWarningIcon.foreground",F,h.kg("problemsWarningIconForeground","The color used for the problems warning icon.")),c("problemsInfoIcon.foreground",z,h.kg("problemsInfoIconForeground","The color used for the problems info icon.")),c("minimap.findMatchHighlight",{light:"#d18616",dark:"#d18616",hcDark:"#AB5A00",hcLight:"#0F4A85"},h.kg("minimapFindMatchHighlight","Minimap marker color for find matches."),!0)),oe=(c("minimap.selectionOccurrenceHighlight",{light:"#c9c9c9",dark:"#676767",hcDark:"#ffffff",hcLight:"#0F4A85"},h.kg("minimapSelectionOccurrenceHighlight","Minimap marker color for repeating editor selections."),!0),c("minimap.selectionHighlight",{light:"#ADD6FF",dark:"#264F78",hcDark:"#ffffff",hcLight:"#0F4A85"},h.kg("minimapSelectionHighlight","Minimap marker color for the editor selection."),!0),c("minimap.infoHighlight",{dark:z,light:z,hcDark:V,hcLight:V},h.kg("minimapInfo","Minimap marker color for infos."))),ae=c("minimap.warningHighlight",{dark:F,light:F,hcDark:P,hcLight:P},h.kg("overviewRuleWarning","Minimap marker color for warnings.")),le=c("minimap.errorHighlight",{dark:new s.Q1(new s.bU(255,18,18,.7)),light:new s.Q1(new s.bU(255,18,18,.7)),hcDark:new s.Q1(new s.bU(255,50,50,1)),hcLight:"#B5200D"},h.kg("minimapError","Minimap marker color for errors.")),he=(c("minimap.background",null,h.kg("minimapBackground","Minimap background color.")),c("minimap.foregroundOpacity",s.Q1.fromHex("#000f"),h.kg("minimapForegroundOpacity",'Opacity of foreground elements rendered in the minimap. For example, "#000000c0" will render the elements with 75% opacity.')),c("minimapSlider.background",f(N,.5),h.kg("minimapSliderBackground","Minimap slider background color.")),c("minimapSlider.hoverBackground",f(I,.5),h.kg("minimapSliderHoverBackground","Minimap slider background color when hovering.")),c("minimapSlider.activeBackground",f(T,.5),h.kg("minimapSliderActiveBackground","Minimap slider background color when clicked on.")),c("charts.foreground",v,h.kg("chartsForeground","The foreground color used in charts.")),c("charts.lines",f(v,.5),h.kg("chartsLines","The color used for horizontal lines in charts.")),c("charts.red",O,h.kg("chartsRed","The red color used in chart visualizations.")),c("charts.blue",z,h.kg("chartsBlue","The blue color used in chart visualizations.")),c("charts.yellow",F,h.kg("chartsYellow","The yellow color used in chart visualizations.")),c("charts.orange",se,h.kg("chartsOrange","The orange color used in chart visualizations.")),c("charts.green",{dark:"#89D185",light:"#388A34",hcDark:"#89D185",hcLight:"#374e06"},h.kg("chartsGreen","The green color used in chart visualizations.")),c("charts.purple",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},h.kg("chartsPurple","The purple color used in chart visualizations.")),c("input.background",{dark:"#3C3C3C",light:s.Q1.white,hcDark:s.Q1.black,hcLight:s.Q1.white},h.kg("inputBoxBackground","Input box background.")),c("input.foreground",v,h.kg("inputBoxForeground","Input box foreground.")),c("input.border",{dark:null,light:null,hcDark:y,hcLight:y},h.kg("inputBoxBorder","Input box border.")),c("inputOption.activeBorder",{dark:"#007ACC",light:"#007ACC",hcDark:y,hcLight:y},h.kg("inputBoxActiveOptionBorder","Border color of activated options in input fields."))),ue=c("inputOption.hoverBackground",{dark:"#5a5d5e80",light:"#b8b8b850",hcDark:null,hcLight:null},h.kg("inputOption.hoverBackground","Background color of activated options in input fields.")),ce=c("inputOption.activeBackground",{dark:f(w,.4),light:f(w,.2),hcDark:s.Q1.transparent,hcLight:s.Q1.transparent},h.kg("inputOption.activeBackground","Background hover color of options in input fields.")),de=c("inputOption.activeForeground",{dark:s.Q1.white,light:s.Q1.black,hcDark:v,hcLight:v},h.kg("inputOption.activeForeground","Foreground color of activated options in input fields.")),ge=(c("input.placeholderForeground",{light:f(v,.5),dark:f(v,.5),hcDark:f(v,.7),hcLight:f(v,.7)},h.kg("inputPlaceholderForeground","Input box foreground color for placeholder text.")),c("inputValidation.infoBackground",{dark:"#063B49",light:"#D6ECF2",hcDark:s.Q1.black,hcLight:s.Q1.white},h.kg("inputValidationInfoBackground","Input validation background color for information severity.")),c("inputValidation.infoForeground",{dark:null,light:null,hcDark:null,hcLight:v},h.kg("inputValidationInfoForeground","Input validation foreground color for information severity.")),c("inputValidation.infoBorder",{dark:"#007acc",light:"#007acc",hcDark:y,hcLight:y},h.kg("inputValidationInfoBorder","Input validation border color for information severity.")),c("inputValidation.warningBackground",{dark:"#352A05",light:"#F6F5D2",hcDark:s.Q1.black,hcLight:s.Q1.white},h.kg("inputValidationWarningBackground","Input validation background color for warning severity.")),c("inputValidation.warningForeground",{dark:null,light:null,hcDark:null,hcLight:v},h.kg("inputValidationWarningForeground","Input validation foreground color for warning severity.")),c("inputValidation.warningBorder",{dark:"#B89500",light:"#B89500",hcDark:y,hcLight:y},h.kg("inputValidationWarningBorder","Input validation border color for warning severity.")),c("inputValidation.errorBackground",{dark:"#5A1D1D",light:"#F2DEDE",hcDark:s.Q1.black,hcLight:s.Q1.white},h.kg("inputValidationErrorBackground","Input validation background color for error severity.")),c("inputValidation.errorForeground",{dark:null,light:null,hcDark:null,hcLight:v},h.kg("inputValidationErrorForeground","Input validation foreground color for error severity.")),c("inputValidation.errorBorder",{dark:"#BE1100",light:"#BE1100",hcDark:y,hcLight:y},h.kg("inputValidationErrorBorder","Input validation border color for error severity.")),c("dropdown.background",{dark:"#3C3C3C",light:s.Q1.white,hcDark:s.Q1.black,hcLight:s.Q1.white},h.kg("dropdownBackground","Dropdown background."))),fe=(c("dropdown.listBackground",{dark:null,light:null,hcDark:s.Q1.black,hcLight:s.Q1.white},h.kg("dropdownListBackground","Dropdown list background.")),c("dropdown.foreground",{dark:"#F0F0F0",light:v,hcDark:s.Q1.white,hcLight:v},h.kg("dropdownForeground","Dropdown foreground."))),me=c("dropdown.border",{dark:ge,light:"#CECECE",hcDark:y,hcLight:y},h.kg("dropdownBorder","Dropdown border.")),pe=c("button.foreground",s.Q1.white,h.kg("buttonForeground","Button foreground color.")),_e=(c("button.separator",f(pe,.4),h.kg("buttonSeparator","Button separator color.")),c("button.background",{dark:"#0E639C",light:"#007ACC",hcDark:null,hcLight:"#0F4A85"},h.kg("buttonBackground","Button background color."))),be=(c("button.hoverBackground",{dark:g(_e,.2),light:d(_e,.2),hcDark:_e,hcLight:_e},h.kg("buttonHoverBackground","Button background color when hovering.")),c("button.border",y,h.kg("buttonBorder","Button border color.")),c("button.secondaryForeground",{dark:s.Q1.white,light:s.Q1.white,hcDark:s.Q1.white,hcLight:v},h.kg("buttonSecondaryForeground","Secondary button foreground color.")),c("button.secondaryBackground",{dark:"#3A3D41",light:"#5F6A79",hcDark:null,hcLight:s.Q1.white},h.kg("buttonSecondaryBackground","Secondary button background color."))),ke=(c("button.secondaryHoverBackground",{dark:g(be,.2),light:d(be,.2),hcDark:null,hcLight:null},h.kg("buttonSecondaryHoverBackground","Secondary button background color when hovering.")),c("radio.activeForeground",de,h.kg("radioActiveForeground","Foreground color of active radio option."))),Ce=(c("radio.activeBackground",ce,h.kg("radioBackground","Background color of active radio option.")),c("radio.activeBorder",he,h.kg("radioActiveBorder","Border color of the active radio option.")),c("radio.inactiveForeground",null,h.kg("radioInactiveForeground","Foreground color of inactive radio option.")),c("radio.inactiveBackground",null,h.kg("radioInactiveBackground","Background color of inactive radio option.")),c("radio.inactiveBorder",{light:f(ke,.2),dark:f(ke,.2),hcDark:f(ke,.4),hcLight:f(ke,.2)},h.kg("radioInactiveBorder","Border color of the inactive radio option.")),c("radio.inactiveHoverBackground",ue,h.kg("radioHoverBackground","Background color of inactive active radio option when hovering.")),c("checkbox.background",ge,h.kg("checkbox.background","Background color of checkbox widget.")),c("checkbox.selectBackground",R,h.kg("checkbox.select.background","Background color of checkbox widget when the element it's in is selected.")),c("checkbox.foreground",fe,h.kg("checkbox.foreground","Foreground color of checkbox widget.")),c("checkbox.border",me,h.kg("checkbox.border","Border color of checkbox widget.")),c("checkbox.selectBorder",L,h.kg("checkbox.select.border","Border color of checkbox widget when the element it's in is selected.")),c("keybindingLabel.background",{dark:new s.Q1(new s.bU(128,128,128,.17)),light:new s.Q1(new s.bU(221,221,221,.4)),hcDark:s.Q1.transparent,hcLight:s.Q1.transparent},h.kg("keybindingLabelBackground","Keybinding label background color. The keybinding label is used to represent a keyboard shortcut.")),c("keybindingLabel.foreground",{dark:s.Q1.fromHex("#CCCCCC"),light:s.Q1.fromHex("#555555"),hcDark:s.Q1.white,hcLight:v},h.kg("keybindingLabelForeground","Keybinding label foreground color. The keybinding label is used to represent a keyboard shortcut.")),c("keybindingLabel.border",{dark:new s.Q1(new s.bU(51,51,51,.6)),light:new s.Q1(new s.bU(204,204,204,.4)),hcDark:new s.Q1(new s.bU(111,195,223)),hcLight:y},h.kg("keybindingLabelBorder","Keybinding label border color. The keybinding label is used to represent a keyboard shortcut.")),c("keybindingLabel.bottomBorder",{dark:new s.Q1(new s.bU(68,68,68,.6)),light:new s.Q1(new s.bU(187,187,187,.4)),hcDark:new s.Q1(new s.bU(111,195,223)),hcLight:v},h.kg("keybindingLabelBottomBorder","Keybinding label border bottom color. The keybinding label is used to represent a keyboard shortcut.")),c("list.focusBackground",null,h.kg("listFocusBackground","List/Tree background color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),c("list.focusForeground",null,h.kg("listFocusForeground","List/Tree foreground color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),c("list.focusOutline",{dark:w,light:w,hcDark:S,hcLight:S},h.kg("listFocusOutline","List/Tree outline color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),c("list.focusAndSelectionOutline",null,h.kg("listFocusAndSelectionOutline","List/Tree outline color for the focused item when the list/tree is active and selected. An active list/tree has keyboard focus, an inactive does not.")),c("list.activeSelectionBackground",{dark:"#04395E",light:"#0060C0",hcDark:null,hcLight:s.Q1.fromHex("#0F4A85").transparent(.1)},h.kg("listActiveSelectionBackground","List/Tree background color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not."))),ve=c("list.activeSelectionForeground",{dark:s.Q1.white,light:s.Q1.white,hcDark:null,hcLight:null},h.kg("listActiveSelectionForeground","List/Tree foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),Le=c("list.activeSelectionIconForeground",null,h.kg("listActiveSelectionIconForeground","List/Tree icon foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),we=(c("list.inactiveSelectionBackground",{dark:"#37373D",light:"#E4E6F1",hcDark:null,hcLight:s.Q1.fromHex("#0F4A85").transparent(.1)},h.kg("listInactiveSelectionBackground","List/Tree background color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),c("list.inactiveSelectionForeground",null,h.kg("listInactiveSelectionForeground","List/Tree foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),c("list.inactiveSelectionIconForeground",null,h.kg("listInactiveSelectionIconForeground","List/Tree icon foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),c("list.inactiveFocusBackground",null,h.kg("listInactiveFocusBackground","List/Tree background color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),c("list.inactiveFocusOutline",null,h.kg("listInactiveFocusOutline","List/Tree outline color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),c("list.hoverBackground",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:s.Q1.white.transparent(.1),hcLight:s.Q1.fromHex("#0F4A85").transparent(.1)},h.kg("listHoverBackground","List/Tree background when hovering over items using the mouse.")),c("list.hoverForeground",null,h.kg("listHoverForeground","List/Tree foreground when hovering over items using the mouse.")),c("list.dropBackground",{dark:"#062F4A",light:"#D6EBFF",hcDark:null,hcLight:null},h.kg("listDropBackground","List/Tree drag and drop background when moving items over other items when using the mouse.")),c("list.dropBetweenBackground",{dark:L,light:L,hcDark:null,hcLight:null},h.kg("listDropBetweenBackground","List/Tree drag and drop border color when moving items between items when using the mouse.")),c("list.highlightForeground",{dark:"#2AAAFF",light:"#0066BF",hcDark:w,hcLight:w},h.kg("highlight","List/Tree foreground color of the match highlights when searching inside the list/tree.")));var ye,Se;c("list.focusHighlightForeground",{dark:we,light:(ye=Ce,Se=we,{op:6,if:ye,then:Se,else:"#BBE7FF"}),hcDark:we,hcLight:we},h.kg("listFocusHighlightForeground","List/Tree foreground color of the match highlights on actively focused items when searching inside the list/tree.")),c("list.invalidItemForeground",{dark:"#B89500",light:"#B89500",hcDark:"#B89500",hcLight:"#B5200D"},h.kg("invalidItemForeground","List/Tree foreground color for invalid items, for example an unresolved root in explorer.")),c("list.errorForeground",{dark:"#F88070",light:"#B01011",hcDark:null,hcLight:null},h.kg("listErrorForeground","Foreground color of list items containing errors.")),c("list.warningForeground",{dark:"#CCA700",light:"#855F00",hcDark:null,hcLight:null},h.kg("listWarningForeground","Foreground color of list items containing warnings.")),c("listFilterWidget.background",{light:d(R,0),dark:g(R,0),hcDark:R,hcLight:R},h.kg("listFilterWidgetBackground","Background color of the type filter widget in lists and trees.")),c("listFilterWidget.outline",{dark:s.Q1.transparent,light:s.Q1.transparent,hcDark:"#f38518",hcLight:"#007ACC"},h.kg("listFilterWidgetOutline","Outline color of the type filter widget in lists and trees.")),c("listFilterWidget.noMatchesOutline",{dark:"#BE1100",light:"#BE1100",hcDark:y,hcLight:y},h.kg("listFilterWidgetNoMatchesOutline","Outline color of the type filter widget in lists and trees, when there are no matches.")),c("listFilterWidget.shadow",Y,h.kg("listFilterWidgetShadow","Shadow color of the type filter widget in lists and trees.")),c("list.filterMatchBackground",{dark:W,light:W,hcDark:null,hcLight:null},h.kg("listFilterMatchHighlight","Background color of the filtered match.")),c("list.filterMatchBorder",{dark:H,light:H,hcDark:y,hcLight:S},h.kg("listFilterMatchHighlightBorder","Border color of the filtered match.")),c("list.deemphasizedForeground",{dark:"#8C8C8C",light:"#8E8E90",hcDark:"#A7A8A9",hcLight:"#666666"},h.kg("listDeemphasizedForeground","List/Tree foreground color for items that are deemphasized."));const xe=c("tree.indentGuidesStroke",{dark:"#585858",light:"#a9a9a9",hcDark:"#a9a9a9",hcLight:"#a5a5a5"},h.kg("treeIndentGuidesStroke","Tree stroke color for the indentation guides.")),Ee=(c("tree.inactiveIndentGuidesStroke",f(xe,.4),h.kg("treeInactiveIndentGuidesStroke","Tree stroke color for the indentation guides that are not active.")),c("tree.tableColumnsBorder",{dark:"#CCCCCC20",light:"#61616120",hcDark:null,hcLight:null},h.kg("tableColumnsBorder","Table border color between columns.")),c("tree.tableOddRowsBackground",{dark:f(v,.04),light:f(v,.04),hcDark:null,hcLight:null},h.kg("tableOddRowsBackgroundColor","Background color for odd table rows.")),c("editorActionList.background",R,h.kg("editorActionListBackground","Action List background color.")),c("editorActionList.foreground",M,h.kg("editorActionListForeground","Action List foreground color.")),c("editorActionList.focusForeground",ve,h.kg("editorActionListFocusForeground","Action List foreground color for the focused item.")),c("editorActionList.focusBackground",Ce,h.kg("editorActionListFocusBackground","Action List background color for the focused item.")),c("menu.border",{dark:null,light:null,hcDark:y,hcLight:y},h.kg("menuBorder","Border color of menus.")),c("menu.foreground",fe,h.kg("menuForeground","Foreground color of menu items.")),c("menu.background",ge,h.kg("menuBackground","Background color of menu items.")),c("menu.selectionForeground",ve,h.kg("menuSelectionForeground","Foreground color of the selected menu item in menus.")),c("menu.selectionBackground",Ce,h.kg("menuSelectionBackground","Background color of the selected menu item in menus.")),c("menu.selectionBorder",{dark:null,light:null,hcDark:S,hcLight:S},h.kg("menuSelectionBorder","Border color of the selected menu item in menus.")),c("menu.separatorBackground",{dark:"#606060",light:"#D4D4D4",hcDark:y,hcLight:y},h.kg("menuSeparatorBackground","Color of a separator menu item in menus.")),c("quickInput.background",R,h.kg("pickerBackground","Quick picker background color. The quick picker widget is the container for pickers like the command palette.")),c("quickInput.foreground",M,h.kg("pickerForeground","Quick picker foreground color. The quick picker widget is the container for pickers like the command palette.")),c("quickInputTitle.background",{dark:new s.Q1(new s.bU(255,255,255,.105)),light:new s.Q1(new s.bU(0,0,0,.06)),hcDark:"#000000",hcLight:s.Q1.white},h.kg("pickerTitleBackground","Quick picker title background color. The quick picker widget is the container for pickers like the command palette.")),c("pickerGroup.foreground",{dark:"#3794FF",light:"#0066BF",hcDark:s.Q1.white,hcLight:"#0F4A85"},h.kg("pickerGroupForeground","Quick picker color for grouping labels.")),c("pickerGroup.border",{dark:"#3F3F46",light:"#CCCEDB",hcDark:s.Q1.white,hcLight:"#0F4A85"},h.kg("pickerGroupBorder","Quick picker color for grouping borders.")),c("quickInput.list.focusBackground",null,"",void 0,h.kg("quickInput.list.focusBackground deprecation","Please use quickInputList.focusBackground instead")));c("quickInputList.focusForeground",ve,h.kg("quickInput.listFocusForeground","Quick picker foreground color for the focused item.")),c("quickInputList.focusIconForeground",Le,h.kg("quickInput.listFocusIconForeground","Quick picker icon foreground color for the focused item.")),c("quickInputList.focusBackground",{dark:m(Ee,Ce),light:m(Ee,Ce),hcDark:null,hcLight:null},h.kg("quickInput.listFocusBackground","Quick picker background color for the focused item.")),c("search.resultsInfoForeground",{light:v,dark:f(v,.65),hcDark:v,hcLight:v},h.kg("search.resultsInfoForeground","Color of the text in the search viewlet's completion message.")),c("searchEditor.findMatchBackground",{light:f(W,.66),dark:f(W,.66),hcDark:W,hcLight:W},h.kg("searchEditor.queryMatch","Color of the Search Editor query matches.")),c("searchEditor.findMatchBorder",{light:f(H,.66),dark:f(H,.66),hcDark:H,hcLight:H},h.kg("searchEditor.editorFindMatchBorder","Border color of the Search Editor query matches."))},5295:(e,t,n)=>{"use strict";n.d(t,{Gy:()=>h,zy:()=>d,Yf:()=>u});var i,r,s=n(2106),o=n(9235),a=n(2399),l=n(7167);(r=i||(i={})).DARK="dark",r.LIGHT="light",r.HIGH_CONTRAST_DARK="hcDark",r.HIGH_CONTRAST_LIGHT="hcLight";const h=(0,a.u1)("themeService");function u(e){return{id:e}}const c=new class{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new s.vl}onColorThemeChange(e){return this.themingParticipants.push(e),this.onThemingParticipantAddedEmitter.fire(e),(0,o.s)((()=>{const t=this.themingParticipants.indexOf(e);this.themingParticipants.splice(t,1)}))}getThemingParticipants(){return this.themingParticipants}};function d(e){return c.onColorThemeChange(e)}l.O.add("base.contributions.theming",c),o.jG}},t={};function n(i){var r=t[i];if(void 0!==r)return r.exports;var s=t[i]={exports:{}};return e[i](s,s.exports,n),s.exports}n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.e=()=>Promise.resolve(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{"use strict";var e=n(5585),t=n(7798),i=n(6358);let r=!1;globalThis.onmessage=n=>{r||function(){if(r)return;r=!0;const n=new e.SimpleWorkerServer((e=>{globalThis.postMessage(e)}),(e=>new t.EditorSimpleWorker(i.EditorWorkerHost.getChannel(e),null)));globalThis.onmessage=e=>{n.onmessage(e.data)}}()}})()})();